Skip to content

Commit

Permalink
test: Add small delay to L0_lifecycle test_load_new_model_version aft…
Browse files Browse the repository at this point in the history
…er each model reload (#7735)
  • Loading branch information
kthui authored Oct 24, 2024
1 parent c91e412 commit a434122
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions qa/L0_lifecycle/lifecycle_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3529,6 +3529,8 @@ def test_load_new_model_version(self):
f.truncate(0)
f.seek(0)
f.write(config)
# make sure the disk operation is done before reloading
time.sleep(0.1)
# reload the model
client.load_model(model_name)

Expand All @@ -3550,6 +3552,8 @@ def test_load_new_model_version(self):

# simulate a dependency change to all versions
Path(os.path.join("models", model_name, "dummy_dependency.py")).touch()
# make sure the disk operation is done before reloading
time.sleep(0.1)
# reload the model
client.load_model(model_name)

Expand Down Expand Up @@ -3577,6 +3581,8 @@ def test_load_new_model_version(self):
f.truncate(0)
f.seek(0)
f.write(config)
# make sure the disk operation is done before reloading
time.sleep(0.1)
# reload the model
client.load_model(model_name)

Expand Down Expand Up @@ -3604,6 +3610,8 @@ def test_load_new_model_version(self):
f.truncate(0)
f.seek(0)
f.write(config)
# make sure the disk operation is done before reloading
time.sleep(0.1)
# reload the model
client.load_model(model_name)

Expand Down

0 comments on commit a434122

Please sign in to comment.