SpringBoot: test GP can not be rejected twice
This commit is contained in:
parent
c1dbb3d213
commit
5cc579230f
@ -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/"
|
||||||
|
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user