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++) {
// 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(
"/flow/"

View File

@ -110,6 +110,14 @@ public class CordaClientTest {
holdingIdentityResolver.getByUsername(gpReceiver));
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) {