From c3dfb8395f8d5171740e844728db073e61a5ad5e Mon Sep 17 00:00:00 2001 From: Valentin Chaboche Date: Mon, 22 Aug 2022 10:20:05 +0200 Subject: [PATCH 1/2] Revert "Proto,SCORU: Deactivate flaky PBT test about refutation games" This reverts commit 89d9675b3a8aadb0f0f51300f08022c7d1dca814. --- .../lib_protocol/test/pbt/test_refutation_game.ml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/proto_alpha/lib_protocol/test/pbt/test_refutation_game.ml b/src/proto_alpha/lib_protocol/test/pbt/test_refutation_game.ml index e1d2d376ef0f..78d23e67b671 100644 --- a/src/proto_alpha/lib_protocol/test/pbt/test_refutation_game.ml +++ b/src/proto_alpha/lib_protocol/test/pbt/test_refutation_game.ml @@ -1638,10 +1638,10 @@ let test_perfect_against_eager = let test_eager_against_perfect = test_game ~nonempty_inputs:true ~p1_strategy:Eager ~p2_strategy:Perfect () -let _test_perfect_against_keen = +let test_perfect_against_keen = test_game ~p1_strategy:Perfect ~p2_strategy:Keen () -let _test_keen_against_perfect = +let test_keen_against_perfect = test_game ~p1_strategy:Keen ~p2_strategy:Perfect () let tests = @@ -1653,9 +1653,9 @@ let tests = test_perfect_against_lazy; test_lazy_against_perfect; test_perfect_against_eager; - test_eager_against_perfect - (* test_perfect_against_keen; *) - (* test_keen_against_perfect; *); + test_eager_against_perfect; + test_perfect_against_keen; + test_keen_against_perfect; ] ) (** {2 Entry point} *) -- GitLab From 0f9d301fe7d84bcbd160f4fa32cbbb8fc4451129 Mon Sep 17 00:00:00 2001 From: Valentin Chaboche Date: Mon, 22 Aug 2022 13:34:32 +0200 Subject: [PATCH 2/2] Scoru,Test: fix: ignore when players agree on the final state hash --- .../lib_protocol/test/pbt/test_refutation_game.ml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/proto_alpha/lib_protocol/test/pbt/test_refutation_game.ml b/src/proto_alpha/lib_protocol/test/pbt/test_refutation_game.ml index 78d23e67b671..d427d4f84a32 100644 --- a/src/proto_alpha/lib_protocol/test/pbt/test_refutation_game.ml +++ b/src/proto_alpha/lib_protocol/test/pbt/test_refutation_game.ml @@ -1579,7 +1579,15 @@ let test_game ?nonempty_inputs ~p1_strategy ~p2_strategy () = levels_and_inputs ) -> let open Lwt_result_syntax in (* Otherwise, there is no conflict. *) - QCheck2.assume (not (p1_client.states = p2_client.states)) ; + QCheck2.assume + (not + (let p1_head = List.last_opt p1_client.states in + let p2_head = List.last_opt p2_client.states in + Option.equal + (fun (t1, state_hash1) (t2, state_hash2) -> + Tick.equal t1 t2 && State_hash.equal state_hash1 state_hash2) + p1_head + p2_head)) ; let* block = prepare_game block -- GitLab