Fix SNMP trap test race (#7731)
This commit is contained in:
parent
47bc60fba1
commit
7f3c30b8f2
|
|
@ -1287,6 +1287,8 @@ func TestReceiveTrap(t *testing.T) {
|
||||||
PrivPassword: tt.privPass,
|
PrivPassword: tt.privPass,
|
||||||
}
|
}
|
||||||
require.Nil(t, s.Init())
|
require.Nil(t, s.Init())
|
||||||
|
// Don't look up oid with snmptranslate.
|
||||||
|
s.execCmd = fakeExecCmd
|
||||||
var acc testutil.Accumulator
|
var acc testutil.Accumulator
|
||||||
require.Nil(t, s.Start(&acc))
|
require.Nil(t, s.Start(&acc))
|
||||||
defer s.Stop()
|
defer s.Stop()
|
||||||
|
|
@ -1297,9 +1299,6 @@ func TestReceiveTrap(t *testing.T) {
|
||||||
s.load(entry.oid, entry.e)
|
s.load(entry.oid, entry.e)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Don't look up oid with snmptranslate.
|
|
||||||
s.execCmd = fakeExecCmd
|
|
||||||
|
|
||||||
// Send the trap
|
// 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)
|
sendTrap(t, port, now, tt.trap, tt.version, tt.secLevel, tt.secName, tt.authProto, tt.authPass, tt.privProto, tt.privPass, tt.contextName, tt.engineID)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue