Remove all useless scapy WARNING: on import from scapy
Just delay a whee bit in SSH agent before closing channel/session.
For some reason, there seems to be unread data in the tcp queue.
When closed quickly ends up RST'ing the tcp/onos-karaf server side session.
This causes a bogus "Connection reset by peer" exception in the ONOS log for every cli session established to ONOS from cord-tester
Change-Id: I954429b7d132d89b0f0515b267468bf4127ac127
diff --git a/src/test/utils/SSHTestAgent.py b/src/test/utils/SSHTestAgent.py
index 1f6a6d0..e5930bf 100644
--- a/src/test/utils/SSHTestAgent.py
+++ b/src/test/utils/SSHTestAgent.py
@@ -1,5 +1,7 @@
-import os, sys
+import os, sys, time
from paramiko import SSHClient, WarningPolicy, AutoAddPolicy
+import logging
+logging.getLogger('scapy.runtime').setLevel(logging.ERROR)
from scapy.all import *
class SSHTestAgent(object):
@@ -47,6 +49,7 @@
output += data
else:
break
+ time.sleep(0.1)
channel.close()
self.client.close()
return st, output