Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private final static String ENDPOINT_ADDRESS = "https://localhost:5000/rest";
- private final static String WADL_ADDRESS = ENDPOINT_ADDRESS + "?_wadl";
- private static void waitForWADL() throws Exception {
- WebClient client = WebClient.create(WADL_ADDRESS);
- // wait for 20 secs or so
- for (int i = 0; i < 20; i++) {
- Thread.currentThread().sleep(1000);
- Response response = client.get();
- if (response.getStatus() == 200) {
- break;
- }
- }
- // no WADL is available yet - throw an exception or give tests a chance to run anyway
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement