use of com.hw.helper.Client in project mt-auth by publicdevop2019.
the class BizClientIdempotentTest method create_client_w_same_changeId_two_times_concurrent.
@Test
public void create_client_w_same_changeId_two_times_concurrent() {
Client oldClient = action.getClientAsResource(CLIENT_ID_RESOURCE_ID);
String s = UUID.randomUUID().toString();
Runnable runnable2 = () -> {
ResponseEntity<String> client1 = action.createClient(oldClient, s);
Assert.assertEquals(HttpStatus.OK, client1.getStatusCode());
};
ArrayList<Runnable> runnables = new ArrayList<>();
runnables.add(runnable2);
runnables.add(runnable2);
try {
assertConcurrent("", runnables, 30000);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
Aggregations