Skip to content

Commit

Permalink
Fix flaky test
Browse files Browse the repository at this point in the history
Test
```
//deps/rabbitmq_mqtt:shared_SUITE-mixed --test_env FOCUS="-group [web_mqtt,v3,cluster_size_1] -case block_only_publisher"
```
was flaky:
```
=== Ended at 2023-06-26 07:09:57
=== Location: [{shared_SUITE,block_only_publisher,1323},
              {test_server,ts_tc,1782},
              {test_server,run_test_case_eval1,1291},
              {test_server,run_test_case_eval,1223}]
=== === Reason: no match of right hand side value {error,ack_timeout}
  in function  shared_SUITE:block_only_publisher/1 (shared_SUITE.erl, line 1323)
  in call from test_server:ts_tc/3 (test_server.erl, line 1782)
  in call from test_server:run_test_case_eval1/6 (test_server.erl, line 1291)
  in call from test_server:run_test_case_eval/9 (test_server.erl, line 1223)
```
It seems that the ack_timeout of 1 second was too low for a
subscription.
  • Loading branch information
ansd committed Jun 26, 2023
1 parent a715eb7 commit b3795f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deps/rabbitmq_mqtt/test/shared_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1314,7 +1314,7 @@ block(Config) ->
block_only_publisher(Config) ->
Topic = atom_to_binary(?FUNCTION_NAME),

Opts = [{ack_timeout, 1}],
Opts = [{ack_timeout, 2}],
Con = connect(<<"background-connection">>, Config, Opts),
Sub = connect(<<"subscriber-connection">>, Config, Opts),
Pub = connect(<<"publisher-connection">>, Config, Opts),
Expand Down

0 comments on commit b3795f5

Please # to comment.