mirror of https://github.com/apache/lucene.git
disable TestInjection in TestStressCloudBlindAtomicUpdates
work around for SOLR-13189
This commit is contained in:
parent
79d0dabed4
commit
0a01b9e127
|
@ -172,11 +172,15 @@ public class TestStressCloudBlindAtomicUpdates extends SolrCloudTestCase {
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
private void clearCloudCollection() throws Exception {
|
private void clearCloudCollection() throws Exception {
|
||||||
|
TestInjection.reset();
|
||||||
|
waitForRecoveriesToFinish(CLOUD_CLIENT);
|
||||||
|
|
||||||
assertEquals(0, CLOUD_CLIENT.deleteByQuery("*:*").getStatus());
|
assertEquals(0, CLOUD_CLIENT.deleteByQuery("*:*").getStatus());
|
||||||
assertEquals(0, CLOUD_CLIENT.optimize().getStatus());
|
assertEquals(0, CLOUD_CLIENT.optimize().getStatus());
|
||||||
|
|
||||||
TestInjection.reset();
|
|
||||||
|
|
||||||
|
assertEquals("Collection should be empty!",
|
||||||
|
0, CLOUD_CLIENT.query(params("q", "*:*")).getResults().getNumFound());
|
||||||
|
|
||||||
final int injectionPercentage = (int)Math.ceil(atLeast(1) / 2);
|
final int injectionPercentage = (int)Math.ceil(atLeast(1) / 2);
|
||||||
testInjection = usually() ? "false:0" : ("true:" + injectionPercentage);
|
testInjection = usually() ? "false:0" : ("true:" + injectionPercentage);
|
||||||
}
|
}
|
||||||
|
@ -185,17 +189,19 @@ public class TestStressCloudBlindAtomicUpdates extends SolrCloudTestCase {
|
||||||
* Assigns {@link #testInjection} to various TestInjection variables. Calling this
|
* Assigns {@link #testInjection} to various TestInjection variables. Calling this
|
||||||
* method multiple times in the same method should always result in the same setting being applied
|
* method multiple times in the same method should always result in the same setting being applied
|
||||||
* (even if {@link TestInjection#reset} was called in between.
|
* (even if {@link TestInjection#reset} was called in between.
|
||||||
|
*
|
||||||
|
* NOTE: method is currently a No-Op pending SOLR-13189
|
||||||
*/
|
*/
|
||||||
private void startTestInjection() {
|
private void startTestInjection() {
|
||||||
log.info("TestInjection: fail replica, update pause, tlog pauses: " + testInjection);
|
log.info("TODO: TestInjection disabled pending solution to SOLR-13189");
|
||||||
TestInjection.failReplicaRequests = testInjection;
|
//log.info("TestInjection: fail replica, update pause, tlog pauses: " + testInjection);
|
||||||
TestInjection.updateLogReplayRandomPause = testInjection;
|
//TestInjection.failReplicaRequests = testInjection;
|
||||||
TestInjection.updateRandomPause = testInjection;
|
//TestInjection.updateLogReplayRandomPause = testInjection;
|
||||||
|
//TestInjection.updateRandomPause = testInjection;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
// commented out on: 24-Dec-2018 @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028")
|
|
||||||
public void test_dv() throws Exception {
|
public void test_dv() throws Exception {
|
||||||
String field = "long_dv";
|
String field = "long_dv";
|
||||||
checkExpectedSchemaField(map("name", field,
|
checkExpectedSchemaField(map("name", field,
|
||||||
|
@ -206,8 +212,8 @@ public class TestStressCloudBlindAtomicUpdates extends SolrCloudTestCase {
|
||||||
|
|
||||||
checkField(field);
|
checkField(field);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
// 12-Jun-2018 @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028")
|
|
||||||
public void test_dv_stored() throws Exception {
|
public void test_dv_stored() throws Exception {
|
||||||
String field = "long_dv_stored";
|
String field = "long_dv_stored";
|
||||||
checkExpectedSchemaField(map("name", field,
|
checkExpectedSchemaField(map("name", field,
|
||||||
|
@ -229,7 +235,7 @@ public class TestStressCloudBlindAtomicUpdates extends SolrCloudTestCase {
|
||||||
|
|
||||||
checkField(field);
|
checkField(field);
|
||||||
}
|
}
|
||||||
// commented 4-Sep-2018 @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Jul-2018
|
|
||||||
public void test_dv_idx() throws Exception {
|
public void test_dv_idx() throws Exception {
|
||||||
String field = "long_dv_idx";
|
String field = "long_dv_idx";
|
||||||
checkExpectedSchemaField(map("name", field,
|
checkExpectedSchemaField(map("name", field,
|
||||||
|
@ -473,6 +479,7 @@ public class TestStressCloudBlindAtomicUpdates extends SolrCloudTestCase {
|
||||||
|
|
||||||
public static void waitForRecoveriesToFinish(CloudSolrClient client) throws Exception {
|
public static void waitForRecoveriesToFinish(CloudSolrClient client) throws Exception {
|
||||||
assert null != client.getDefaultCollection();
|
assert null != client.getDefaultCollection();
|
||||||
|
client.getZkStateReader().forceUpdateCollection(client.getDefaultCollection());
|
||||||
AbstractDistribZkTestBase.waitForRecoveriesToFinish(client.getDefaultCollection(),
|
AbstractDistribZkTestBase.waitForRecoveriesToFinish(client.getDefaultCollection(),
|
||||||
client.getZkStateReader(),
|
client.getZkStateReader(),
|
||||||
true, true, 330);
|
true, true, 330);
|
||||||
|
|
Loading…
Reference in New Issue