fix: remove timing assertion from MIB stubs test to avoid CI flakiness
This commit is contained in:
parent
6cee88c7b3
commit
9132703d17
1 changed files with 3 additions and 9 deletions
|
|
@ -264,7 +264,7 @@ defmodule SnmpKit.SnmpMgr.MIBStubsTest do
|
|||
end
|
||||
|
||||
describe "performance characteristics" do
|
||||
test "resolution is fast for all stub objects" do
|
||||
test "resolution succeeds for all stub objects" do
|
||||
# Test a sample of objects to ensure reasonable performance
|
||||
test_objects = [
|
||||
"sysDescr",
|
||||
|
|
@ -279,20 +279,14 @@ defmodule SnmpKit.SnmpMgr.MIBStubsTest do
|
|||
"mikrotik"
|
||||
]
|
||||
|
||||
# Measure time for multiple resolutions
|
||||
start_time = System.monotonic_time(:microsecond)
|
||||
|
||||
# Verify all resolutions succeed (no timing assertion to avoid CI flakiness)
|
||||
for _i <- 1..100 do
|
||||
for object <- test_objects do
|
||||
assert {:ok, _oid} = MIB.resolve(object)
|
||||
end
|
||||
end
|
||||
|
||||
end_time = System.monotonic_time(:microsecond)
|
||||
total_time = end_time - start_time
|
||||
|
||||
# Should be fast - less than 20ms for 1000 resolutions (increased for slower CI runners)
|
||||
assert total_time < 20_000
|
||||
# Test passes if all 1000 resolutions succeed without error
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue