Homework 2 forum

Tests not running when corrects

 
Picture of Ulysse Coscoy
Tests not running when corrects
by Ulysse Coscoy - Tuesday, 17 November 2020, 11:03
 

Hi,

I have an issue with every correct test i have never return anything (just wait until the end of the test time).

If a test is a failure, it will fail normally, any idea why ?

thanks in advance.


Picture of Aaron Joos Lippeveldts
Re: Tests not running when corrects
by Aaron Joos Lippeveldts - Tuesday, 17 November 2020, 11:43
 

If you mean that the test will run forever and not show any output without -v, it probably means the test is passing but is waiting forever for your gossipers to exit.

I had the same problem, and it turned out the stopMsg thing did not work anymore on my computer. I don't know why, golang update maybe(?) but whenever I tried to send a message to a socket using itself it would quietly fail with error "sendto: invalid argument 127.0.0.1:0". Maybe you have the same issue?

Picture of Dorian Ros
Re: Tests not running when corrects
by Dorian Ros - Tuesday, 17 November 2020, 11:53
 

I had the same problem at the beginning. You might want to look at the address that is given to your gossiper during their instantiation in the tests, this might give you a clue to what is happening.

Picture of Aaron Joos Lippeveldts
Re: Tests not running when corrects
by Aaron Joos Lippeveldts - Tuesday, 17 November 2020, 12:13
 

Oh, so they are not given a port anymore by the tests, I did not check that at all and just changed my code to remove the stopMsg.

Thanks for the info.

Picture of Ulysse Coscoy
Re: Tests not running when corrects
by Ulysse Coscoy - Tuesday, 17 November 2020, 12:34
 

Thanks a lot, my stop function was Sending a message on a wrong port !