Skip to content

Commit

Permalink
fix type
Browse files Browse the repository at this point in the history
  • Loading branch information
River2000i committed Nov 21, 2024
1 parent 6f2eddb commit c7a3a20
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions dm/tests/openapi/client/openapi_task_check
Original file line number Diff line number Diff line change
Expand Up @@ -428,14 +428,13 @@ def check_sync_task_status_success(

for item in data.get("data", []):
# Only validate sync task status
unit = item.get("unit")
assert unit == "Sync"
assert item.get("unit") == "Sync"
sync_status = item.get("sync_status", {})
dump_io_total_bytes = sync_status.get("dump_io_total_bytes")
io_total_bytes = sync_status.get("io_total_bytes")
assert dump_io_total_bytes is not None and io_total_bytes is not None
assert dump_io_total_bytes > min_dump_io_total_bytes and io_total_bytes > min_io_total_bytes
assert dump_io_total_bytes < max_dump_io_total_bytes and io_total_bytes < max_io_total_bytes
assert dump_io_total_bytes > int(min_dump_io_total_bytes) and io_total_bytes > int(min_io_total_bytes)
assert dump_io_total_bytes < int(max_dump_io_total_bytes) and io_total_bytes < int(max_io_total_bytes)

def get_task_status_success_but_worker_meet_error(task_name, total):
url = API_ENDPOINT + "/" + task_name + "/status"
Expand Down

0 comments on commit c7a3a20

Please sign in to comment.