Skip to content

Commit

Permalink
Increase the sleep time for mutex test to avoid flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
bichengying committed Jun 4, 2020
1 parent 471f639 commit 1d72425
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/torch_win_ops_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,8 @@ def test_win_put_with_given_destination(self):
tensor = self.cast_and_place(tensor, dtype)
window_name = "win_put_given_{}_{}".format(dim, dtype)
bf.win_create(tensor, window_name)
bf.win_put(tensor, window_name, dst_weights={
(rank+1) % size: 1.23})
bf.win_put(tensor, window_name,
dst_weights={(rank+1) % size: 1.23})
bf.barrier()
sync_result = bf.win_update(window_name)
assert (list(sync_result.shape) == [23] * dim), (
Expand Down Expand Up @@ -580,7 +580,7 @@ def test_win_mutex_full(self):
if rank == 0:
with bf.win_mutex():
bf.barrier()
time.sleep(2.0)
time.sleep(2.01)
else:
bf.barrier()
t_start = time.time()
Expand All @@ -604,7 +604,7 @@ def test_win_mutex_given_ranks(self):
if rank == 0:
with bf.win_mutex([0]):
bf.barrier()
time.sleep(2.0)
time.sleep(2.01)
elif rank == 1:
bf.barrier()
t_start = time.time()
Expand Down

0 comments on commit 1d72425

Please sign in to comment.