Skip to content

Commit

Permalink
Improved timeout test case.
Browse files Browse the repository at this point in the history
  • Loading branch information
lextm committed Oct 18, 2024
1 parent ac129b0 commit 42442ec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion tests/agent_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ def setValue(self, name, idx, value):

class NoAccessMibScalarInstance(MibScalarInstance):
def getValue(self, name, idx):
time.sleep(2) # Add a 2-second sleep
return self.getSyntax().clone(f"Test agent")

def setValue(self, name, idx, value):
Expand Down
4 changes: 2 additions & 2 deletions tests/hlapi/v3arch/asyncio/manager/cmdgen/test_v1_get.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import pytest

from pysnmp.hlapi.v3arch.asyncio import *
from pysnmp.proto.errind import RequestTimedOut
from pysnmp.proto.rfc1905 import errorStatus as pysnmp_errorStatus

from tests.agent_context import AGENT_PORT, AgentContextManager
Expand Down Expand Up @@ -94,8 +95,7 @@ async def run_get():
ContextData(),
ObjectType(ObjectIdentity("1.3.6.1.4.1.60069.9.1.0")),
)
for varBind in varBinds:
print([str(varBind[0]), varBind[1]])
assert isinstance(errorIndication, RequestTimedOut)

start = datetime.now()
try:
Expand Down

0 comments on commit 42442ec

Please sign in to comment.