Skip to content

Commit

Permalink
Fix SNMP trap test race (influxdata#7731)
Browse files Browse the repository at this point in the history
  • Loading branch information
reimda authored and rhajek committed Jul 13, 2020
1 parent c029037 commit 44961e1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions plugins/inputs/snmp_trap/snmp_trap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1287,6 +1287,8 @@ func TestReceiveTrap(t *testing.T) {
PrivPassword: tt.privPass,
}
require.Nil(t, s.Init())
// Don't look up oid with snmptranslate.
s.execCmd = fakeExecCmd
var acc testutil.Accumulator
require.Nil(t, s.Start(&acc))
defer s.Stop()
Expand All @@ -1297,9 +1299,6 @@ func TestReceiveTrap(t *testing.T) {
s.load(entry.oid, entry.e)
}

// Don't look up oid with snmptranslate.
s.execCmd = fakeExecCmd

// Send the trap
sendTrap(t, port, now, tt.trap, tt.version, tt.secLevel, tt.secName, tt.authProto, tt.authPass, tt.privProto, tt.privPass, tt.contextName, tt.engineID)

Expand Down

0 comments on commit 44961e1

Please sign in to comment.