Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve time import error in exception_handler #1095

Merged
merged 1 commit into from
Oct 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion locust/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from .runners import LocalLocustRunner, MasterLocustRunner, SlaveLocustRunner
from .stats import (print_error_report, print_percentile_stats, print_stats,
stats_printer, stats_writer, write_stat_csvs)
from .util.time import parse_timespan
from .util.timespan import parse_timespan

_internals = [Locust, HttpLocust]
version = locust.__version__
Expand Down
2 changes: 1 addition & 1 deletion locust/test/test_util.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import unittest
from locust.util.time import parse_timespan
from locust.util.timespan import parse_timespan
from locust.util.rounding import proper_round


Expand Down
6 changes: 6 additions & 0 deletions locust/test/test_zmqrpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,9 @@ def test_client_recv(self):
self.assertEqual(msg.type, 'test')
self.assertEqual(msg.data, 'message')
self.assertEqual(msg.node_id, 'identity')

def test_client_retry(self):
server = zmqrpc.Server('0.0.0.0', 8888)
server.socket.close()
with self.assertRaises(zmq.error.ZMQError):
server.recv_from_client()
File renamed without changes.