Hello, I just finished writing a udp server, which reads packets from a transfer server in a thread, saves the values in a hashmap and returns them when called with the shell commands. Everything works just fine but when I run the unit test it times out when checking if it creates and shutsdown the sockets correctly. I closed the BufferedReader and then call the shell command shutdown() which successfully closes the datagramSocket, the listenerThread then throws a new StopShellException(). I used a print statemente to verify that it reaches right before the stopshellexecption. Since the shutdown() is the last line in the udp servers run() funtion its supposed to return to main and stop right? I dont know what could cause the timeout
#Timeout when unittesting
1 messages · Page 1 of 1 (latest)
<@&987246399047479336> please have a look, thanks.
While you are waiting for getting help, here are some tips to improve your experience:
If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.
Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.
try using the debugger of your ide to step through what your program actually does