Skip to content

Commit ac65639

Browse files
committed
Try a different way
1 parent b86647d commit ac65639

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

azure-kusto-ingest/tests/test_e2e_ingest.py

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -254,18 +254,9 @@ async def assert_rows_added(cls, table_name: str, expected: int, timeout: int =
254254
row = response.primary_results[0][0]
255255
row_async = response_from_async.primary_results[0][0]
256256
actual = int(row["Count"])
257+
actual_async = int(row_async["Count"])
257258
# this is done to allow for data to arrive properly
258-
if actual >= expected:
259-
if row_async != row:
260-
# retry once more to avoid transient issues
261-
await asyncio.sleep(5)
262-
async with await cls.get_async_client() as async_client:
263-
command = "{} | count".format(table_name)
264-
response = cls.client.execute(cls.test_db, command)
265-
response_from_async = await async_client.execute(cls.test_db, command)
266-
row = response.primary_results[0][0]
267-
row_async = response_from_async.primary_results[0][0]
268-
assert row_async == row, "Sync and Async clients returned different results: sync={0}, async={1}".format(row, row_async)
259+
if actual >= expected and actual_async >= expected:
269260
break
270261
assert actual == expected, "Row count expected = {0}, while actual row count = {1}".format(expected, actual)
271262

0 commit comments

Comments
 (0)