This is an automated email from the ASF dual-hosted git repository.
chamikaramj pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/master by this push:
new 6d31e0e0c14 [Java] Fix TextIO gzip split test on Windows (#40078)
6d31e0e0c14 is described below
commit 6d31e0e0c14d61a72ad59c1c659fa31eb3e9399a
Author: XuJian <[email protected]>
AuthorDate: Mon Oct 12 05:56:32 2026 +0800
[Java] Fix TextIO gzip split test on Windows (#40078)
Signed-off-by: xujiantop-crypto
<[email protected]>
---
.../core/src/test/java/org/apache/beam/sdk/io/TextIOReadTest.java | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git
a/sdks/java/core/src/test/java/org/apache/beam/sdk/io/TextIOReadTest.java
b/sdks/java/core/src/test/java/org/apache/beam/sdk/io/TextIOReadTest.java
index ce7b62fe1d2..ce5a1b5e2ac 100644
--- a/sdks/java/core/src/test/java/org/apache/beam/sdk/io/TextIOReadTest.java
+++ b/sdks/java/core/src/test/java/org/apache/beam/sdk/io/TextIOReadTest.java
@@ -37,7 +37,6 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
-import static org.junit.Assume.assumeFalse;
import java.io.BufferedWriter;
import java.io.File;
@@ -99,7 +98,6 @@ import
org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.Immuta
import
org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.Iterables;
import
org.apache.commons.compress.compressors.bzip2.BZip2CompressorOutputStream;
import
org.apache.commons.compress.compressors.deflate.DeflateCompressorOutputStream;
-import org.apache.commons.lang3.SystemUtils;
import org.joda.time.Duration;
import org.junit.Rule;
import org.junit.Test;
@@ -1054,11 +1052,10 @@ public class TextIOReadTest {
@Test
public void testInitialSplitAutoModeGz() throws Exception {
- // TODO: Java core test failing on windows,
https://github.com/apache/beam/issues/20470
- assumeFalse(SystemUtils.IS_OS_WINDOWS);
PipelineOptions options = TestPipeline.testingPipelineOptions();
- long desiredBundleSize = 1000;
File largeGz = writeToFile(LARGE, tempFolder, "large.gz", GZIP);
+ // Gzip output size varies across platforms, so derive a bundle size
from the actual file.
+ long desiredBundleSize = largeGz.length() / 3;
// Sanity check: file is at least 2 bundles long.
assertThat(largeGz.length(), greaterThan(2 * desiredBundleSize));