@@ -38,7 +38,7 @@ def test_send_message_should_trigger_correlation_rule(self):
38
38
time .sleep (_PERIOD )
39
39
40
40
try :
41
- self ._graylog .wait_until_event ()
41
+ self ._graylog .wait_until_event ('correlation-count' )
42
42
except ServerTimeoutError :
43
43
print (self ._graylog .get_events ())
44
44
events_count = self ._graylog .get_events_count ()
@@ -52,7 +52,7 @@ def test_send_message_should_trigger_correlation_rule_with_group_by(self):
52
52
time .sleep (_PERIOD )
53
53
inputs .send ({'short_message' : 'pop' })
54
54
55
- self ._graylog .wait_until_event ()
55
+ self ._graylog .wait_until_event ('correlation-count' )
56
56
57
57
def test_send_message_with_different_values_for_group_by_field_should_not_trigger_correlation_rule_with_group_by (self ):
58
58
self ._graylog .create_correlation_count (1 , group_by = ['x' ], period = _PERIOD )
@@ -63,7 +63,7 @@ def test_send_message_with_different_values_for_group_by_field_should_not_trigge
63
63
inputs .send ({'short_message' : 'pop' })
64
64
65
65
time .sleep (20 )
66
- self .assertEqual (0 , self ._graylog .get_events_count ())
66
+ self .assertEqual (0 , self ._graylog .get_events_count ('correlation-count' ))
67
67
68
68
def test_send_message_should_trigger_correlation_rule_with_group_by_when_value_has_a_space__issue27 (self ):
69
69
self ._graylog .create_correlation_count (1 , group_by = ['x' ], period = _PERIOD , messages_order = 'BEFORE' )
@@ -78,7 +78,7 @@ def test_send_message_should_trigger_correlation_rule_with_group_by_when_value_h
78
78
time .sleep (_PERIOD )
79
79
inputs .send ({'short_message' : 'pop' })
80
80
81
- self ._graylog .wait_until_event ()
81
+ self ._graylog .wait_until_event ('correlation-count' )
82
82
83
83
def test_send_message_should_not_fail_on_correlation_rule_with_group_by_when_value_has_a_double_quote__issue27 (self ):
84
84
self ._graylog .create_correlation_count (1 , group_by = ['x' ], period = _PERIOD , messages_order = 'BEFORE' )
@@ -112,7 +112,7 @@ def test_send_message_should_trigger_correlation_rule_with_search_query(self):
112
112
time .sleep (_PERIOD )
113
113
114
114
try :
115
- self ._graylog .wait_until_event ()
115
+ self ._graylog .wait_until_event ('correlation-count' )
116
116
except ServerTimeoutError :
117
117
print (self ._graylog .get_events ())
118
118
events_count = self ._graylog .get_events_count ()
@@ -125,7 +125,7 @@ def test_send_message_should_trigger_correlation_rule_with_search_query_and_addi
125
125
time .sleep (_PERIOD )
126
126
127
127
try :
128
- self ._graylog .wait_until_event ()
128
+ self ._graylog .wait_until_event ('correlation-count' )
129
129
except ServerTimeoutError :
130
130
print (self ._graylog .get_events ())
131
131
events_count = self ._graylog .get_events_count ()
@@ -138,8 +138,8 @@ def test_send_message_should_not_trigger_correlation_rule_with_search_query(self
138
138
time .sleep (_PERIOD )
139
139
140
140
try :
141
- self ._graylog .wait_until_event ()
142
- events_count = self ._graylog .get_events_count ()
141
+ self ._graylog .wait_until_event ('correlation-count' )
142
+ events_count = self ._graylog .get_events_count ('correlation-count' )
143
143
self .fail (f'Events count: { events_count } (expected 0)' )
144
144
except ServerTimeoutError :
145
145
print (self ._graylog .get_events ())
0 commit comments