Skip to content

Commit d674d08

Browse files
committed
test: disable parallel multipart upload tests for binary tests;
1 parent ed0e7f0 commit d674d08

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

src/main/java/io/seqera/tower/cli/commands/data/links/upload/AbstractProviderUploader.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ public abstract class AbstractProviderUploader implements CloudProviderUploader
6060
/**
6161
* Test-only override of the multipart part size, in bytes, so a test can drive a multi-part upload
6262
* without producing a multi-hundred-megabyte fixture.
63+
*
64+
* <p>Only takes effect in-process: the binary test run executes the native image as a separate
65+
* process, which does not inherit the test JVM's system properties, so tests relying on this must be
66+
* disabled when {@code TOWER_CLI} is set.
6367
*/
6468
public static final String PART_SIZE_PROPERTY = "io.seqera.tower.cli.upload.partSizeBytes";
6569

src/test/java/io/seqera/tower/cli/data/DataLinksCmdTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
import io.seqera.tower.cli.utils.PaginationInfo;
3232
import io.seqera.tower.model.DataLinkDto;
3333
import org.junit.jupiter.api.BeforeEach;
34+
import org.junit.jupiter.api.condition.DisabledIfEnvironmentVariable;
3435
import org.junit.jupiter.params.ParameterizedTest;
3536
import org.junit.jupiter.params.provider.CsvSource;
3637
import org.junit.jupiter.params.provider.EnumSource;
@@ -805,6 +806,8 @@ void testUploadSingleFile(OutputType format, MockServerClient mock) throws IOExc
805806

806807
@ParameterizedTest
807808
@EnumSource(value = OutputType.class, names = {"json"})
809+
@DisabledIfEnvironmentVariable(named = "TOWER_CLI", matches = ".+",
810+
disabledReason = "shrinks the part size through a system property, which cannot reach the native binary running as a separate process")
808811
void testUploadMultipartFileInParallel(OutputType format, MockServerClient mock) throws IOException {
809812
// credentials fetch
810813
mock.when(
@@ -915,6 +918,8 @@ void testUploadMultipartFileInParallel(OutputType format, MockServerClient mock)
915918

916919
@ParameterizedTest
917920
@EnumSource(value = OutputType.class, names = {"json"})
921+
@DisabledIfEnvironmentVariable(named = "TOWER_CLI", matches = ".+",
922+
disabledReason = "shrinks the part size through a system property, which cannot reach the native binary running as a separate process")
918923
void testUploadFailsWhenPartCountDisagreesWithPlatform(OutputType format, MockServerClient mock) throws IOException {
919924
// credentials fetch
920925
mock.when(

0 commit comments

Comments
 (0)