Skip to content

Commit a434122

Browse files
authored
test: Add small delay to L0_lifecycle test_load_new_model_version after each model reload (#7735)
1 parent c91e412 commit a434122

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

qa/L0_lifecycle/lifecycle_test.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3529,6 +3529,8 @@ def test_load_new_model_version(self):
35293529
f.truncate(0)
35303530
f.seek(0)
35313531
f.write(config)
3532+
# make sure the disk operation is done before reloading
3533+
time.sleep(0.1)
35323534
# reload the model
35333535
client.load_model(model_name)
35343536

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

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

@@ -3577,6 +3581,8 @@ def test_load_new_model_version(self):
35773581
f.truncate(0)
35783582
f.seek(0)
35793583
f.write(config)
3584+
# make sure the disk operation is done before reloading
3585+
time.sleep(0.1)
35803586
# reload the model
35813587
client.load_model(model_name)
35823588

@@ -3604,6 +3610,8 @@ def test_load_new_model_version(self):
36043610
f.truncate(0)
36053611
f.seek(0)
36063612
f.write(config)
3613+
# make sure the disk operation is done before reloading
3614+
time.sleep(0.1)
36073615
# reload the model
36083616
client.load_model(model_name)
36093617

0 commit comments

Comments
 (0)