X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=tests%2Ftest-reconnect.py;h=c478c2a9b2f529faf466939a101540adbb7f14f3;hb=0ef165ecb57943e17a8ee8270df68ffb8d032e29;hp=90d337af3e0c942c641455ddb90d736433c12939;hpb=26bb0f31299d3f8eb06551d6a219846929c27149;p=sliver-openvswitch.git diff --git a/tests/test-reconnect.py b/tests/test-reconnect.py index 90d337af3..c478c2a9b 100644 --- a/tests/test-reconnect.py +++ b/tests/test-reconnect.py @@ -1,4 +1,4 @@ -# Copyright (c) 2009, 2010 Nicira Networks. +# Copyright (c) 2009, 2010, 2012 Nicira, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,7 +13,6 @@ # limitations under the License. import errno -import logging import sys import ovs.reconnect @@ -62,8 +61,8 @@ def do_connected(_): r.connected(now) -def do_received(_): - r.received(now) +def do_activity(_): + r.activity(now) def do_run(arg): @@ -111,10 +110,10 @@ def diff_stats(old, new, delta): % (new.state, new.state_elapsed, new.backoff)) if (old.creation_time != new.creation_time or - old.last_received != new.last_received or + old.last_activity != new.last_activity or old.last_connected != new.last_connected): - print(" created %d, last received %d, last connected %d" - % (new.creation_time, new.last_received, new.last_connected)) + print(" created %d, last activity %d, last connected %d" + % (new.creation_time, new.last_activity, new.last_connected)) if (old.n_successful_connections != new.n_successful_connections or old.n_attempted_connections != new.n_attempted_connections or @@ -167,7 +166,7 @@ def main(): "connecting": do_connecting, "connect-failed": do_connect_failed, "connected": do_connected, - "received": do_received, + "activity": do_activity, "run": do_run, "advance": do_advance, "timeout": do_timeout, @@ -177,8 +176,6 @@ def main(): "listen-error": do_listen_error } - logging.basicConfig(level=logging.CRITICAL) - global now global r