Skip to content

Commit

Permalink
fix: wrong test condition
Browse files Browse the repository at this point in the history
  • Loading branch information
sagivoululumigo committed Dec 12, 2023
1 parent 6631ed9 commit 0492286
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions src/test/integration/fastapi/tests/test_fastapi.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import unittest
from parameterized import parameterized
from test.test_utils.span_exporter import wait_for_exporter

from test.test_utils.spans_parser import SpansContainer

Expand Down Expand Up @@ -66,10 +67,10 @@ def test_endpoint_filter_match(self):
body = response.json()
self.assertEqual(body, {"message": "Hello again, FastAPI!"})

spans_container = SpansContainer.get_spans_from_file(
wait_time_sec=10, expected_span_count=3
)
self.assertEqual(3, len(spans_container.spans))
wait_for_exporter()

spans_container = SpansContainer.get_spans_from_file()
self.assertEqual(0, len(spans_container.spans))

def test_endpoint_filter_no_match(self):
endpoint = f"http://localhost:{APP_PORT}/"
Expand Down
2 changes: 1 addition & 1 deletion src/test/integration/flask/tests/test_flask.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def test_200_OK_filter_match(self):
wait_for_exporter()

spans_container = SpansContainer.get_spans_from_file()
self.assertEqual(1, len(spans_container.spans))
self.assertEqual(0, len(spans_container.spans))

def test_requests_instrumentation(self):
with FlaskApp(APP_PORT):
Expand Down

0 comments on commit 0492286

Please sign in to comment.