Skip to content

Commit

Permalink
Merge pull request #1095 from ajt89/time-import-fix
Browse files Browse the repository at this point in the history
Resolve time import error in exception_handler
  • Loading branch information
mbeacom authored Oct 1, 2019
2 parents c95dda3 + c285fc6 commit d5d28e6
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
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 @@ -36,3 +36,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.

0 comments on commit d5d28e6

Please sign in to comment.