diff --git a/sdks/java/io/file-based-io-tests/src/test/java/org/apache/beam/sdk/io/text/TextIOIT.java b/sdks/java/io/file-based-io-tests/src/test/java/org/apache/beam/sdk/io/text/TextIOIT.java index ecdde5cbc8fe..e50a8aba4162 100644 --- a/sdks/java/io/file-based-io-tests/src/test/java/org/apache/beam/sdk/io/text/TextIOIT.java +++ b/sdks/java/io/file-based-io-tests/src/test/java/org/apache/beam/sdk/io/text/TextIOIT.java @@ -157,7 +157,7 @@ public void writeThenReadAll() { Set sources = Lineage.query(result.metrics(), Lineage.Type.SOURCE); Set sinks = Lineage.query(result.metrics(), Lineage.Type.SINK); - if (numShards <= 100) { + if (numShards != null && numShards <= 100) { // both should be the full files, if supported by the runner assertEquals(sources, sinks); } else {