From 9ad7e0863d1ab4e0d5e2b66d62006956967796f9 Mon Sep 17 00:00:00 2001 From: Ziheng Sun Date: Sun, 14 Jan 2024 17:31:32 -0500 Subject: [PATCH] the process status is not necessarily done by the time of calling recent --- src/test/java/com/gw/HistoryTest.java | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/src/test/java/com/gw/HistoryTest.java b/src/test/java/com/gw/HistoryTest.java index 82ad00b79..82fd6dac8 100644 --- a/src/test/java/com/gw/HistoryTest.java +++ b/src/test/java/com/gw/HistoryTest.java @@ -109,23 +109,9 @@ void testProcessRecentHistory() throws Exception { "http://localhost:" + this.port + "/Geoweaver/web/recent", postRequest, String.class); - System.out.println("Postresult = " + Postresult); - - long startTime = System.currentTimeMillis(); - long timeout = 10000; - long pollingInterval = 1000; - - while (System.currentTimeMillis() - startTime < timeout) { - if (Postresult.contains("Done")) { - break; - } - - Thread.sleep(pollingInterval); - } - assertThat(Postresult).contains("["); assertThat(Postresult).contains("id"); - assertThat(Postresult).contains("Done"); + assertThat(Postresult).contains("testpython2"); assertThat(Postresult).contains("name"); ObjectMapper mapper = new ObjectMapper();