Problems with node names in test HW1

Problems with node names in test HW1

by Bastien Beuchat -
Number of replies: 2

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 ?

In reply to Bastien Beuchat

Re: Problems with node names in test HW1

by Olivér Facklam -

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