Correctly align non-matching layers

PiperOrigin-RevId: 346840424
This commit is contained in:
Tamir Duberstein
2020-12-10 12:27:46 -08:00
committed by gVisor bot
parent a177bfdbc4
commit 205015687b
+2 -2
View File
@@ -603,9 +603,9 @@ func (conn *Connection) ExpectFrame(t *testing.T, layers Layers, timeout time.Du
}
if gotLayers == nil {
if errs == nil {
return nil, fmt.Errorf("got no frames matching %v during %s", layers, timeout)
return nil, fmt.Errorf("got no frames matching %s during %s", layers, timeout)
}
return nil, fmt.Errorf("got frames %w want %v during %s", errs, layers, timeout)
return nil, fmt.Errorf("got frames:\n%w want %s during %s", errs, layers, timeout)
}
if conn.match(layers, gotLayers) {
for i, s := range conn.layerStates {