Fixed a bug that HttpServer in unit test does not start correctly. (#2361)
Because the http client in unit test try to connect to the server when server is not ready yet.
This commit is contained in:
@ -255,7 +255,9 @@ abstract public class DorisHttpTestCase {
|
||||
httpServer.setup();
|
||||
httpServer.start();
|
||||
// must ensure the http server started before any unit test
|
||||
Thread.sleep(5000);
|
||||
while (!httpServer.isStarted()) {
|
||||
Thread.sleep(500);
|
||||
}
|
||||
doSetUp();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user