-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Don't start a new node in InternalTestCluster#getClient
#127318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,11 +14,9 @@ | |
| import org.elasticsearch.http.HttpSmokeTestCase; | ||
| import org.elasticsearch.plugins.Plugin; | ||
| import org.elasticsearch.snapshots.mockstore.MockRepository; | ||
| import org.elasticsearch.test.ESIntegTestCase; | ||
|
|
||
| import java.util.Collection; | ||
|
|
||
| @ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0, numClientNodes = 0) | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Some tests didn't actually need any specific cluster configuration. |
||
| public abstract class AbstractSnapshotRestTestCase extends HttpSmokeTestCase { | ||
|
|
||
| /** | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,8 +33,6 @@ private Settings.Builder nodeSettingsBuilder(int nodeOrdinal, Settings otherSett | |
| } | ||
|
|
||
| public void testClusterRestartWithLicense() throws Exception { | ||
| wipeAllLicenses(); | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wiping the licenses before the test starts doesn't make sense if we start with an empty cluster (i.e. no nodes). |
||
|
|
||
| int numNodes = randomIntBetween(1, 5); | ||
| logger.info("--> starting {} node(s)", numNodes); | ||
| internalCluster().startNodes(numNodes); | ||
|
|
@@ -79,7 +77,6 @@ public void testClusterRestartWithLicense() throws Exception { | |
| } | ||
|
|
||
| public void testClusterRestartWhileEnabled() throws Exception { | ||
| wipeAllLicenses(); | ||
| internalCluster().startNode(); | ||
| ensureGreen(); | ||
| assertLicenseActive(true); | ||
|
|
@@ -91,7 +88,6 @@ public void testClusterRestartWhileEnabled() throws Exception { | |
| } | ||
|
|
||
| public void testClusterRestartWhileExpired() throws Exception { | ||
| wipeAllLicenses(); | ||
| internalCluster().startNode(); | ||
| ensureGreen(); | ||
| assertLicenseActive(true); | ||
|
|
@@ -106,7 +102,6 @@ public void testClusterRestartWhileExpired() throws Exception { | |
|
|
||
| public void testClusterRestartWithOldSignature() throws Exception { | ||
| assumeFalse("Can't run in a FIPS JVM. We can't generate old licenses since PBEWithSHA1AndDESede is not available", inFipsJvm()); | ||
| wipeAllLicenses(); | ||
| internalCluster().startNode(); | ||
| ensureGreen(); | ||
| assertLicenseActive(true); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some tests depend on there being exactly one node in the cluster, which I solved like this.