I am confused by the prepare-server.sh file. It is my understanding that this file starts up the server and starts listening for requests. Then why does it keep logging waiting for spring application to start in the console? Isn’t server already

Lets look at the command swe have provided…

./gradlew bootrun &

the & towards end pushes the command in the background and returns back the control.

Now, starting spring server is time consuming task, which means it takes upto 20-25 seconds to start. If we start executing the tests immediately, the tests will fail, because server hasnt started yet.

The way spring server starts is, it will initialize all the required modules, and then attack a socket to it, which will listen to 8080.

The next three lines is basically waiting till the server starts listening on 8080. Once 8080 port is available, we assume that the server is started and then we start executing the tests.

Hope this helps.

but even after 2 - 4 min it not start testing and i have use server.port = 8081 will that effexting the process

Closing this topic as your issue is resolved by the mentor. If it is still not resolved, Kindly un-mark the accepted solution or create a new topic and post this question as a reference link in the description of the new topic.