mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-08 22:14:59 +00:00
Test: made the simple no master node test more useful
Original commit: elastic/x-pack-elasticsearch@4ffc11d702
This commit is contained in:
parent
168bed9d32
commit
6b4f68fcb3
@ -76,14 +76,18 @@ public class NoMasterNodeTests extends AbstractAlertingTests {
|
|||||||
// Bring back the 2nd node and wait for elected master node to come back and alerting to work as expected.
|
// Bring back the 2nd node and wait for elected master node to come back and alerting to work as expected.
|
||||||
startElectedMasterNodeAndWait();
|
startElectedMasterNodeAndWait();
|
||||||
|
|
||||||
// Delete an existing alert
|
// Our first alert should at least have been triggered twice
|
||||||
|
assertAlertTriggered("my-first-alert", 2);
|
||||||
|
|
||||||
|
// Delete the existing alert
|
||||||
DeleteAlertResponse response = alertClient().prepareDeleteAlert("my-first-alert").get();
|
DeleteAlertResponse response = alertClient().prepareDeleteAlert("my-first-alert").get();
|
||||||
assertThat(response.deleteResponse().isFound(), is(true));
|
assertThat(response.deleteResponse().isFound(), is(true));
|
||||||
|
|
||||||
// Add a new alert and wait for it get triggered
|
// Add a new alert and wait for it get triggered
|
||||||
alertClient().preparePutAlert("my-second-alert")
|
alertClient().preparePutAlert("my-second-alert")
|
||||||
.setAlertSource(alertSource)
|
.setAlertSource(alertSource)
|
||||||
.get();
|
.get();
|
||||||
assertAlertTriggered("my-second-alert", 2);
|
assertAlertTriggered("my-second-alert", 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
Loading…
x
Reference in New Issue
Block a user