Skip to content

Commit

Permalink
[Test] Remove randomization for credentials protected remote connecti…
Browse files Browse the repository at this point in the history
…on (#96309) (#96338)

This PR removes the randomBoolean for whether the
remoteClusterConnection is credentials protected so that test does not
occationally fail due to RCS remote cluster server not bootstrapped.

Removal of the randomization does not reduce the test coverage because
the test is meant to encounter failures when attempting connection. So
it should have failed before it even reaches the part when different
remote cluster mode comes into play. However sometimes the connection
does come through and it will fail because the remote cluster server is
not actually configured. The fact that the connection comes through
sometimes seems to be of its own bug. So removing the current
randomization can potentially help reveal the underlying cause of why
the connection sometimes does not fail. In addition, there are other
tests in the class that dedicately test the new RCS remote connections.

Resolves: #96282
  • Loading branch information
ywangd committed May 25, 2023
1 parent c0fbf84 commit b17213c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ public void testCloseWhileConcurrentlyConnecting() throws IOException, Interrupt
service.acceptIncomingRequests();
String clusterAlias = "test-cluster";
Settings settings = buildRandomSettings(clusterAlias, seedNodes);
try (RemoteClusterConnection connection = new RemoteClusterConnection(settings, clusterAlias, service, randomBoolean())) {
try (RemoteClusterConnection connection = new RemoteClusterConnection(settings, clusterAlias, service, false)) {
int numThreads = randomIntBetween(4, 10);
Thread[] threads = new Thread[numThreads];
CyclicBarrier barrier = new CyclicBarrier(numThreads + 1);
Expand Down

0 comments on commit b17213c

Please sign in to comment.