Skip to content

Commit

Permalink
PROTON-2780 Fix potential race on scripted test scenario
Browse files Browse the repository at this point in the history
Fix ordering of test script that can lead to false positive test
failure.
  • Loading branch information
tabish121 committed Dec 6, 2023
1 parent ff865e7 commit 71dddbd
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ private void doTestTxnDeclarationAndDischarge(UnsignedInteger messageFormat) thr
client.expectOpen();
client.expectBegin();
client.expectCoordinatorAttach().ofReceiver();
client.expectFlow().withLinkCredit(2);

client.remoteHeader(AMQPHeader.getAMQPHeader()).now();
client.remoteOpen().now();
Expand All @@ -205,7 +206,6 @@ private void doTestTxnDeclarationAndDischarge(UnsignedInteger messageFormat) thr
.withCoordinator().also()
.withSource().withAddress("txn-address")
.and().now();
client.expectFlow().withLinkCredit(2);
client.waitForScriptToComplete(5, TimeUnit.SECONDS);
client.expectDisposition().withState().declared(new byte[] {0, 1, 2, 3});
client.remoteDeclare().withMessageFormat(messageFormat).withDeliveryTag(new byte[] {0}).withDeliveryId(0).now();
Expand Down

0 comments on commit 71dddbd

Please sign in to comment.