Skip to content

Commit

Permalink
fix expected vs actual ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
pimlu committed Nov 21, 2024
1 parent 3ab1a55 commit 4c6c738
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions pkg/network/tracer/connection/ebpfless/tcp_processor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -525,9 +525,9 @@ func TestConnRefusedSyn(t *testing.T) {
f := newTcpTestFixture(t)
f.runAgainstState(basicHandshake, expectedClientStates)

require.Equal(t, f.conn.TCPFailures, map[uint16]uint32{
require.Equal(t, map[uint16]uint32{
uint16(syscall.ECONNREFUSED): 1,
})
}, f.conn.TCPFailures)

expectedStats := network.StatCounters{
SentBytes: 0,
Expand Down Expand Up @@ -558,9 +558,9 @@ func TestConnRefusedSynAck(t *testing.T) {
f := newTcpTestFixture(t)
f.runAgainstState(basicHandshake, expectedClientStates)

require.Equal(t, f.conn.TCPFailures, map[uint16]uint32{
require.Equal(t, map[uint16]uint32{
uint16(syscall.ECONNREFUSED): 1,
})
}, f.conn.TCPFailures)

expectedStats := network.StatCounters{
SentBytes: 0,
Expand Down Expand Up @@ -595,9 +595,9 @@ func TestConnReset(t *testing.T) {
f := newTcpTestFixture(t)
f.runAgainstState(basicHandshake, expectedClientStates)

require.Equal(t, f.conn.TCPFailures, map[uint16]uint32{
require.Equal(t, map[uint16]uint32{
uint16(syscall.ECONNRESET): 1,
})
}, f.conn.TCPFailures)

expectedStats := network.StatCounters{
SentBytes: 0,
Expand Down Expand Up @@ -635,9 +635,9 @@ func TestRstRetransmit(t *testing.T) {
f.runAgainstState(basicHandshake, expectedClientStates)

// should count as a single failure
require.Equal(t, f.conn.TCPFailures, map[uint16]uint32{
require.Equal(t, map[uint16]uint32{
uint16(syscall.ECONNRESET): 1,
})
}, f.conn.TCPFailures)

expectedStats := network.StatCounters{
SentBytes: 0,
Expand Down

0 comments on commit 4c6c738

Please sign in to comment.