Skip to content
Snippets Groups Projects
Commit bcc866d9 authored by Nikolay Stanchev's avatar Nikolay Stanchev
Browse files

Fixed failing integration test of aggregator with influx

parent e7757e48
No related branches found
No related tags found
No related merge requests found
......@@ -223,7 +223,7 @@ class AggregatorThread(Thread):
self.aggregator.stop()
def set_event_lock(self, event):
def add_event_lock(self, event):
"""
Auxiliary method to set a thread-safe event lock object to the aggregator (used for testing).
......
......@@ -46,7 +46,7 @@ class TestE2ESimulation(object):
print("Starting aggregator...")
event = threading.Event()
e2e_aggregator.set_event_lock(event)
e2e_aggregator.add_event_lock(event)
e2e_aggregator.start()
event.wait() # wait until the aggregator thread has set the event lock (it has reached its run method and is ready to start)
......@@ -67,11 +67,11 @@ class TestE2ESimulation(object):
('SELECT count(*) FROM "CLMCMetrics"."autogen"."service_delays"',
{"time": "1970-01-01T00:00:00Z", "count_response_time": 24, "count_request_size": 24, "count_response_size": 24}),
('SELECT count(*) FROM "CLMCMetrics"."autogen"."e2e_delays"',
{"time": "1970-01-01T00:00:00Z", "count_delay_forward": 38, "count_delay_reverse": 38, "count_delay_service": 38,
"count_avg_request_size": 38, "count_avg_response_size": 38, "count_avg_bandwidth": 38}),
{"time": "1970-01-01T00:00:00Z", "count_delay_forward": 46, "count_delay_reverse": 46, "count_delay_service": 46,
"count_avg_request_size": 46, "count_avg_response_size": 46, "count_avg_bandwidth": 46}),
('SELECT mean(*) FROM "CLMCMetrics"."autogen"."e2e_delays"',
{"time": "1970-01-01T00:00:00Z", "mean_delay_forward": 8.010964912280702, "mean_delay_reverse": 12.881578947368423, "mean_delay_service": 23.42105263157895,
{"time": "1970-01-01T00:00:00Z", "mean_delay_forward": 7.856884057971015, "mean_delay_reverse": 13.391304347826088, "mean_delay_service": 25,
'mean_avg_request_size': 10485760, 'mean_avg_response_size': 1024, 'mean_avg_bandwidth': 104857600}),
])
def test_simulation(self, influx_db, query, expected_result):
......@@ -104,5 +104,3 @@ class TestE2ESimulation(object):
assert expected_result.get(key) == actual_result.get(key), "E2E Simulation test failure"
assert expected_result == actual_result, "E2E Simulation test failure"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment