tests: Fix flakey collision test
authorAndrey Petrov <andrey.petrov@shazow.net>
Mon, 11 Jul 2016 16:12:23 +0000 (12:12 -0400)
committerAndrey Petrov <andrey.petrov@shazow.net>
Mon, 11 Jul 2016 16:12:23 +0000 (12:12 -0400)
host_test.go

index f804f2888729f3e428ceaba2444374c9c427a729..c7527ab22993eb5b069c00848b89394e54bd23b8 100644 (file)
@@ -106,9 +106,12 @@ func TestHostNameCollision(t *testing.T) {
 
                // Consume the initial buffer
                scanner.Scan()
+               scanner.Scan()
+               scanner.Scan()
+
                actual := scanner.Text()
                if !strings.HasPrefix(actual, "[Guest1] ") {
-                       t.Errorf("Second client did not get Guest1 name.")
+                       t.Errorf("Second client did not get Guest1 name: %q", actual)
                }
        })
        if err != nil {