Homework 1 forum

Problems with node names in test HW1

 
Picture of Bastien Beuchat
Problems with node names in test HW1
by Bastien Beuchat - Tuesday, 27 October 2020, 10:11
 

Hello,

I still face some issues in Homework 1.

Some tests do not pass and I do not find the reason of this error :

gossiper_test.go:1309:
            Error Trace:    gossiper_test.go:1309
            Error:          Not equal:
                            expected: "A"
                            actual  : "A---TestGossiper_Topo2_5Nodes_Private_Distant"
                           
                            Diff:
                            --- Expected
                            +++ Actual
                            @@ -1 +1 @@
                            -A
                            +A---TestGossiper_Topo2_5Nodes_Private_Distant
            Test:           TestGossiper_Topo2_5Nodes_Private_Distant

Is there anyone that faced the same thing or have an idea of what the problem could be ?

Picture of Olivér Facklam
Re: Problems with node names in test HW1
by Olivér Facklam - Tuesday, 27 October 2020, 10:32
 

Hey,

I think the problem might be that in your `AddPrivateMessage` function, you should use the `origin` given in the arguments as your packet's origin, and not your gossiper's identity.

Of course the two should usually be the same (and IMO this parameter is redundant), but it seems the tests use this...

Best,

Olivér

Picture of Bastien Beuchat
Re: Problems with node names in test HW1
by Bastien Beuchat - Tuesday, 27 October 2020, 10:34
 

Thank you very much. It was indeed the case.