Fix test since the number of successful decryption requests can vary because of concurrency, and how the threshold decryption client executes the requests in parallel (thread pool size etc.).

pull/3398/head
derekpierre 2024-01-23 08:49:26 -05:00 committed by KPrasch
parent edc4f939c1
commit ffb34ad6f8
1 changed files with 4 additions and 1 deletions

View File

@ -268,7 +268,10 @@ def test_ursula_ritualist(
num_successes = REGISTRY.get_sample_value(
"threshold_decryption_num_successes_total"
)
assert len(cohort) == int(num_successes) # each ursula in cohort had a success
ritual = coordinator_agent.get_ritual(RITUAL_ID)
# at least a threshold of ursulas were successful (concurrency)
assert int(num_successes) >= ritual.threshold
print("==================== DECRYPTION SUCCESSFUL ====================")
def error_handler(e):