File tree 2 files changed +8
-5
lines changed
x-pack/qa/smoke-test-monitoring-with-watcher
src/test/java/org/elasticsearch/smoketest
2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -8,8 +8,11 @@ dependencies {
8
8
9
9
testClusters. integTest {
10
10
testDistribution = ' DEFAULT'
11
+ setting ' xpack.slm.enabled' , ' false'
11
12
setting ' xpack.ilm.enabled' , ' false'
12
13
setting ' xpack.monitoring.enabled' , ' true'
14
+ setting ' xpack.monitoring.collection.enabled' , ' true'
15
+ setting ' xpack.monitoring.collection.interval' , ' 1s'
13
16
setting ' xpack.watcher.enabled' , ' true'
14
17
setting ' xpack.security.enabled' , ' false'
15
18
setting ' xpack.ml.enabled' , ' false'
Original file line number Diff line number Diff line change 5
5
*/
6
6
package org .elasticsearch .smoketest ;
7
7
8
- import org .apache .lucene .util .LuceneTestCase .AwaitsFix ;
9
8
import org .elasticsearch .client .Request ;
10
9
import org .elasticsearch .client .Response ;
11
10
import org .elasticsearch .common .Strings ;
18
17
import static org .elasticsearch .common .xcontent .XContentFactory .jsonBuilder ;
19
18
import static org .hamcrest .Matchers .is ;
20
19
21
- @ AwaitsFix (bugUrl = "flaky tests" )
22
20
public class MonitoringWithWatcherRestIT extends ESRestTestCase {
23
21
24
22
/**
@@ -79,9 +77,11 @@ public void testThatHttpExporterAddsWatches() throws Exception {
79
77
}
80
78
81
79
private void assertMonitoringWatchHasBeenOverWritten (String watchId ) throws Exception {
82
- ObjectPath path = ObjectPath .createFromResponse (client ().performRequest (new Request ("GET" , "/_watcher/watch/" + watchId )));
83
- String interval = path .evaluate ("watch.trigger.schedule.interval" );
84
- assertThat (interval , is ("1m" ));
80
+ assertBusy (() -> {
81
+ ObjectPath path = ObjectPath .createFromResponse (client ().performRequest (new Request ("GET" , "/_watcher/watch/" + watchId )));
82
+ String interval = path .evaluate ("watch.trigger.schedule.interval" );
83
+ assertThat (interval , is ("1m" ));
84
+ });
85
85
}
86
86
87
87
private void assertTotalWatchCount (int expectedWatches ) throws Exception {
You can’t perform that action at this time.
0 commit comments