Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,8 @@ jobs:
java-version: '17'
distribution: 'temurin'

- name: Set env
run: echo "github_test=true" >> $GITHUB_ENV

- name: Run java client tests
run: ./gradlew test -p java-client
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,14 @@
import org.jetbrains.annotations.Nullable;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledIf;

import java.io.IOException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentLinkedQueue;
Expand Down Expand Up @@ -287,6 +289,7 @@ public void retryTestNoFlushAndContextExponentialBackoff() throws Exception {
}

@Test
@DisabledIf("isGithubBuild")
public void retryMultiThreadStressTest() throws InterruptedException, IOException {

// DISCLAIMER: this configuration is highly inefficient and only used here to showcase an extreme
Expand Down Expand Up @@ -541,4 +544,9 @@ private BulkIngester<Integer> newBulkIngesterNoFlushAndContextAndLongExponential
.backoffPolicy(BackoffPolicy.exponentialBackoff(100L, 8))
);
}

private boolean isGithubBuild(){
return Optional.ofNullable(System.getenv("github_test"))
.map(Boolean::valueOf).orElse(false);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,14 @@
import org.jetbrains.annotations.Nullable;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledIf;

import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Optional;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutorService;
Expand Down Expand Up @@ -176,6 +178,7 @@ private void multiThreadTest(int maxOperations, int maxRequests, int numThreads,
}

@Test
@DisabledIf("isGithubBuild")
public void multiThreadStressTest() throws InterruptedException, IOException {

String index = "bulk-ingester-stress-test";
Expand Down Expand Up @@ -620,4 +623,8 @@ public void close() throws IOException {
}
}
}
private boolean isGithubBuild(){
return Optional.ofNullable(System.getenv("github_test"))
.map(Boolean::valueOf).orElse(false);
}
}