Don't use TransportClient on FullClusterRestartTests
There seems to be an issue with this test since it shuts down random nodes and TransportClients seem to be confused due to that. For now we disable them to figure out if this is the cause of the sporadic timeouts.
This commit is contained in:
parent
b0b3748cae
commit
2255ecc980
|
@ -33,7 +33,7 @@ import static org.hamcrest.Matchers.equalTo;
|
|||
/**
|
||||
*
|
||||
*/
|
||||
@ClusterScope(scope=Scope.TEST, numNodes = 0)
|
||||
@ClusterScope(scope=Scope.TEST, numNodes = 0, transportClientRatio = 0.0)
|
||||
public class FullRollingRestartTests extends AbstractIntegrationTest {
|
||||
|
||||
@Test
|
||||
|
|
|
@ -136,7 +136,7 @@ public abstract class AbstractIntegrationTest extends ElasticsearchTestCase {
|
|||
default:
|
||||
assert false : "Unknonw Scope: [" + currentClusterScope + "]";
|
||||
}
|
||||
currentCluster.beforeTest(getRandom(), Double.isNaN(TRANSPORT_CLIENT_RATIO) ? randomDouble() : TRANSPORT_CLIENT_RATIO);
|
||||
currentCluster.beforeTest(getRandom(), getPerTestTransportClientRatio());
|
||||
wipeIndices();
|
||||
wipeTemplates();
|
||||
randomIndexTemplate();
|
||||
|
@ -683,6 +683,7 @@ public abstract class AbstractIntegrationTest extends ElasticsearchTestCase {
|
|||
public @interface ClusterScope {
|
||||
Scope scope() default Scope.GLOBAL;
|
||||
int numNodes() default -1;
|
||||
double transportClientRatio() default -1;
|
||||
}
|
||||
|
||||
private static long clusterSeed() {
|
||||
|
@ -701,4 +702,17 @@ public abstract class AbstractIntegrationTest extends ElasticsearchTestCase {
|
|||
return Double.parseDouble(property);
|
||||
}
|
||||
|
||||
private double getPerTestTransportClientRatio() {
|
||||
final ClusterScope annotation = getAnnotation(this.getClass());
|
||||
double perTestRatio = -1;
|
||||
if (annotation != null) {
|
||||
perTestRatio = annotation.transportClientRatio();
|
||||
}
|
||||
if (perTestRatio == -1) {
|
||||
return Double.isNaN(TRANSPORT_CLIENT_RATIO) ? randomDouble() : TRANSPORT_CLIENT_RATIO;
|
||||
}
|
||||
assert perTestRatio >= 0.0 && perTestRatio <= 1.0;
|
||||
return perTestRatio;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue