This is an automated email from the ASF dual-hosted git repository. rnewson pushed a commit to branch auto-delete-3 in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit d8317d3cb0154a2f05a138864b525df4689c0465 Author: Robert Newson <[email protected]> AuthorDate: Tue Jun 3 22:46:25 2025 +0100 pretty print propcheck failure --- test/elixir/test/drop_seq_statem_test.exs | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/test/elixir/test/drop_seq_statem_test.exs b/test/elixir/test/drop_seq_statem_test.exs index 1e509df0b..729e5de2c 100644 --- a/test/elixir/test/drop_seq_statem_test.exs +++ b/test/elixir/test/drop_seq_statem_test.exs @@ -13,31 +13,32 @@ defmodule DropSeqStateM do @moduletag :without_quorum_test @moduletag :with_quorum_test - property "_update_drop_seq works correctly", start_size: 5, max_size: 100, numtests: 10000 do + property "_update_drop_seq works correctly", + start_size: 5, + max_size: 100, + numtests: 10_000 do forall cmds <- commands(__MODULE__) do trap_exit do db_name = random_db_name() n = Enum.random(1..3) q = Enum.random(1..10) + {:ok, _} = create_db(db_name, query: %{n: n, q: q}) r = run_commands(__MODULE__, cmds, [{:dbname, db_name}]) - {history, state, result} = r + {_history, _state, result} = r delete_db(db_name) (result == :ok) - |> when_fail( - IO.puts(""" - n: #{n}, q: #{q} - Commands: #{inspect(cmds, pretty: true)} - History: #{inspect(history, pretty: true)} - State: #{inspect(state, pretty: true)} - Result: #{inspect(result, pretty: true)} - """) - ) + |> when_fail(when_fail_fn(n, q, r, cmds)) end end end + def when_fail_fn(n, q, r, cmds) do + IO.puts("\nn: #{n}, q: #{q}") + print_report(r, cmds) + end + require Record Record.defrecord(:state,
