ElasticV6QueryChangesTest: Align with changes done in V7
- Fix FutureReturnValueIgnored (I7d119d05f) - Replace GerritBaseTests#sanitizedMethodName with a TestRule (Ia3d8487f9) Change-Id: Id4155394ac203c1e53e88132ad133be9fc0fad9d
This commit is contained in:
@@ -14,6 +14,8 @@
|
||||
|
||||
package com.google.gerrit.elasticsearch;
|
||||
|
||||
import static java.util.concurrent.TimeUnit.MINUTES;
|
||||
|
||||
import com.google.gerrit.elasticsearch.ElasticTestUtils.ElasticNodeInfo;
|
||||
import com.google.gerrit.server.query.change.AbstractQueryChangesTest;
|
||||
import com.google.gerrit.testing.ConfigSuite;
|
||||
@@ -62,18 +64,21 @@ public class ElasticV6QueryChangesTest extends AbstractQueryChangesTest {
|
||||
}
|
||||
}
|
||||
|
||||
@After
|
||||
public void closeIndex() {
|
||||
client.execute(
|
||||
new HttpPost(
|
||||
String.format(
|
||||
"http://localhost:%d/%s*/_close", nodeInfo.port, getSanitizedMethodName())),
|
||||
HttpClientContext.create(),
|
||||
null);
|
||||
}
|
||||
|
||||
@Rule public final GerritTestName testName = new GerritTestName();
|
||||
|
||||
@After
|
||||
public void closeIndex() throws Exception {
|
||||
client
|
||||
.execute(
|
||||
new HttpPost(
|
||||
String.format(
|
||||
"http://localhost:%d/%s*/_close",
|
||||
nodeInfo.port, testName.getSanitizedMethodName())),
|
||||
HttpClientContext.create(),
|
||||
null)
|
||||
.get(5, MINUTES);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initAfterLifecycleStart() throws Exception {
|
||||
super.initAfterLifecycleStart();
|
||||
|
||||
Reference in New Issue
Block a user