Skip to content

Commit

Permalink
Catch KeyError as a failure of multithreading as well. (#710)
Browse files Browse the repository at this point in the history
  • Loading branch information
vyasr authored Mar 6, 2022
1 parent 2c6da9f commit dfc28cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_synced_collections/synced_collection_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ def set_value(sd):
try:
with ThreadPoolExecutor(max_workers=num_threads) as executor:
list(executor.map(set_value, [synced_collection] * num_threads * 10))
except (RuntimeError, JSONDecodeError):
except (RuntimeError, JSONDecodeError, KeyError):
# This line may raise an exception, or it may successfully complete
# but not modify all the expected data. If it raises an exception,
# then the underlying data is likely to be invalid, so we must
Expand Down

0 comments on commit dfc28cb

Please sign in to comment.