SpringBoot: test GP can not be rejected twice

This commit is contained in:
djmil 2023-09-07 14:00:27 +02:00
parent c1dbb3d213
commit 5cc579230f
2 changed files with 9 additions and 1 deletions

View File

@ -202,7 +202,7 @@ public class CordaClient {
for (int retry = 0; retry < 6; retry++) { for (int retry = 0; retry < 6; retry++) {
// Give Corda cluster some time to process our request // Give Corda cluster some time to process our request
TimeUnit.SECONDS.sleep(retry*retry +1); // 1 2 5 8 17 33 sec TimeUnit.SECONDS.sleep(retry*retry +2); // 2 3 6 10 18 27 sec
final ResponseEntity<ResponseBody> responce = this.restTemplate.exchange( final ResponseEntity<ResponseBody> responce = this.restTemplate.exchange(
"/flow/" "/flow/"

View File

@ -110,6 +110,14 @@ public class CordaClientTest {
holdingIdentityResolver.getByUsername(gpReceiver)); holdingIdentityResolver.getByUsername(gpReceiver));
assertThat(findByUuid(gpListReceiver, gpUuid)).isNull(); assertThat(findByUuid(gpListReceiver, gpUuid)).isNull();
// GameProposal can not be rejected twice
assertThatThrownBy(() -> {
cordaClient.gameProposalAction(
holdingIdentityResolver.getByUsername(gpSender),
gpUuid,
Action.REJECT);
});
} }
private GameProposal findByUuid(List<GameProposal> gpList, UUID uuid) { private GameProposal findByUuid(List<GameProposal> gpList, UUID uuid) {