Test: fix SSLReloadDuringStartupIntegTests (#55637)
This commit fixes reproducible test failures with the SSLReloadDuringStartupIntegTests on the 7.x branch. The failures only occur on 7.x due to the existence of the transport client and its usage in our test infrastructure. This change removes the randomized usage of transport clients when retrieving a client from a node in the internal cluster. Transport clients do not support the reloading of files for TLS configuration changes but if we build one from the nodes settings and attempt to use it after the files have been changed, the client will not know about the changes and the TLS connection will fail. Closes #55524
This commit is contained in:
parent
97c4b64fb1
commit
30f8c326fe
|
@ -10,6 +10,7 @@ import org.elasticsearch.common.settings.MockSecureSettings;
|
||||||
import org.elasticsearch.common.settings.Settings;
|
import org.elasticsearch.common.settings.Settings;
|
||||||
import org.elasticsearch.env.Environment;
|
import org.elasticsearch.env.Environment;
|
||||||
import org.elasticsearch.env.TestEnvironment;
|
import org.elasticsearch.env.TestEnvironment;
|
||||||
|
import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
|
||||||
import org.elasticsearch.test.InternalTestCluster.RestartCallback;
|
import org.elasticsearch.test.InternalTestCluster.RestartCallback;
|
||||||
import org.elasticsearch.test.SecurityIntegTestCase;
|
import org.elasticsearch.test.SecurityIntegTestCase;
|
||||||
|
|
||||||
|
@ -21,6 +22,10 @@ import java.nio.file.Path;
|
||||||
import java.nio.file.StandardCopyOption;
|
import java.nio.file.StandardCopyOption;
|
||||||
import java.util.concurrent.CountDownLatch;
|
import java.util.concurrent.CountDownLatch;
|
||||||
|
|
||||||
|
// transport clients do not support reloading of files so failures can occur if we allow the use
|
||||||
|
// of transport clients in tests when we are changing files and a transport client is built from
|
||||||
|
// the node we change the files on
|
||||||
|
@ClusterScope(transportClientRatio = 0)
|
||||||
public class SSLReloadDuringStartupIntegTests extends SecurityIntegTestCase {
|
public class SSLReloadDuringStartupIntegTests extends SecurityIntegTestCase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -52,7 +57,6 @@ public class SSLReloadDuringStartupIntegTests extends SecurityIntegTestCase {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/55524")
|
|
||||||
public void testReloadDuringStartup() throws Exception {
|
public void testReloadDuringStartup() throws Exception {
|
||||||
final String node = randomFrom(internalCluster().getNodeNames());
|
final String node = randomFrom(internalCluster().getNodeNames());
|
||||||
final Environment env = internalCluster().getInstance(Environment.class, node);
|
final Environment env = internalCluster().getInstance(Environment.class, node);
|
||||||
|
|
Loading…
Reference in New Issue