Skip to content

Commit

Permalink
Double test timeout
Browse files Browse the repository at this point in the history
Increased to 400 seconds.

Signed-off-by: Jacob Perron <[email protected]>
  • Loading branch information
jacobperron committed Feb 4, 2019
1 parent e2df735 commit b6c6ca8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion rclpy/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ if(BUILD_TESTING)
PYTHON_EXECUTABLE "${PYTHON_EXECUTABLE}"
APPEND_ENV AMENT_PREFIX_PATH=${ament_index_build_path}
PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}
TIMEOUT 200
TIMEOUT 400
)
endif()
endif()
Expand Down
26 changes: 13 additions & 13 deletions rclpy/test/action/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,18 +130,18 @@ def test_wait_for_server_timeout(self):
ac = ActionClient(self.node, Fibonacci, 'not_fibonacci')
try:
start = time.monotonic()
self.assertFalse(ac.wait_for_server(timeout_sec=2.0))
self.assertFalse(ac.wait_for_server(timeout_sec=1.0))
end = time.monotonic()
self.assertGreater(2.0, end - start - TIME_FUDGE)
self.assertLess(2.0, end - start + TIME_FUDGE)
self.assertGreater(1.0, end - start - TIME_FUDGE)
self.assertLess(1.0, end - start + TIME_FUDGE)
finally:
ac.destroy()

def test_wait_for_server_exists(self):
ac = ActionClient(self.node, Fibonacci, 'fibonacci')
try:
start = time.monotonic()
self.assertTrue(ac.wait_for_server(timeout_sec=2.0))
self.assertTrue(ac.wait_for_server(timeout_sec=1.0))
end = time.monotonic()
self.assertGreater(0.0, end - start - TIME_FUDGE)
self.assertLess(0.0, end - start + TIME_FUDGE)
Expand All @@ -151,7 +151,7 @@ def test_wait_for_server_exists(self):
def test_send_goal_async(self):
ac = ActionClient(self.node, Fibonacci, 'fibonacci')
try:
self.assertTrue(ac.wait_for_server(timeout_sec=2.0))
self.assertTrue(ac.wait_for_server(timeout_sec=1.0))
future = ac.send_goal_async(Fibonacci.Goal())
rclpy.spin_until_future_complete(self.node, future, self.executor)
self.assertTrue(future.done())
Expand All @@ -163,7 +163,7 @@ def test_send_goal_async(self):
def test_send_goal_async_with_feedback_after_goal(self):
ac = ActionClient(self.node, Fibonacci, 'fibonacci')
try:
self.assertTrue(ac.wait_for_server(timeout_sec=2.0))
self.assertTrue(ac.wait_for_server(timeout_sec=1.0))

# Send a goal and then publish feedback
goal_uuid = UUID(uuid=list(uuid.uuid4().bytes))
Expand All @@ -183,7 +183,7 @@ def test_send_goal_async_with_feedback_after_goal(self):
def test_send_goal_async_with_feedback_before_goal(self):
ac = ActionClient(self.node, Fibonacci, 'fibonacci')
try:
self.assertTrue(ac.wait_for_server(timeout_sec=2.0))
self.assertTrue(ac.wait_for_server(timeout_sec=1.0))

# Publish feedback before goal has been accepted
goal_uuid = UUID(uuid=list(uuid.uuid4().bytes))
Expand All @@ -206,7 +206,7 @@ def test_send_goal_async_with_feedback_before_goal(self):
def test_send_goal_async_with_feedback_for_another_goal(self):
ac = ActionClient(self.node, Fibonacci, 'fibonacci')
try:
self.assertTrue(ac.wait_for_server(timeout_sec=2.0))
self.assertTrue(ac.wait_for_server(timeout_sec=1.0))

# Send a goal and then publish feedback
first_goal_uuid = UUID(uuid=list(uuid.uuid4().bytes))
Expand Down Expand Up @@ -237,7 +237,7 @@ def test_send_goal_async_with_feedback_for_another_goal(self):
def test_send_goal_async_with_feedback_for_not_a_goal(self):
ac = ActionClient(self.node, Fibonacci, 'fibonacci')
try:
self.assertTrue(ac.wait_for_server(timeout_sec=2.0))
self.assertTrue(ac.wait_for_server(timeout_sec=1.0))

# Send a goal and then publish feedback
goal_uuid = UUID(uuid=list(uuid.uuid4().bytes))
Expand All @@ -262,7 +262,7 @@ def test_send_goal_multiple(self):
callback_group=ReentrantCallbackGroup())
executor = MultiThreadedExecutor(context=self.context)
try:
self.assertTrue(ac.wait_for_server(timeout_sec=2.0))
self.assertTrue(ac.wait_for_server(timeout_sec=1.0))
future_0 = ac.send_goal_async(Fibonacci.Goal())
future_1 = ac.send_goal_async(Fibonacci.Goal())
future_2 = ac.send_goal_async(Fibonacci.Goal())
Expand All @@ -282,15 +282,15 @@ def test_send_goal_async_no_server(self):
ac = ActionClient(self.node, Fibonacci, 'not_fibonacci')
try:
future = ac.send_goal_async(Fibonacci.Goal())
self.timed_spin(2.0)
self.timed_spin(1.0)
self.assertFalse(future.done())
finally:
ac.destroy()

def test_send_cancel_async(self):
ac = ActionClient(self.node, Fibonacci, 'fibonacci')
try:
self.assertTrue(ac.wait_for_server(timeout_sec=2.0))
self.assertTrue(ac.wait_for_server(timeout_sec=1.0))

# Send a goal
goal_future = ac.send_goal_async(Fibonacci.Goal())
Expand All @@ -311,7 +311,7 @@ def test_send_cancel_async(self):
def test_get_result_async(self):
ac = ActionClient(self.node, Fibonacci, 'fibonacci')
try:
self.assertTrue(ac.wait_for_server(timeout_sec=2.0))
self.assertTrue(ac.wait_for_server(timeout_sec=1.0))

# Send a goal
goal_future = ac.send_goal_async(Fibonacci.Goal())
Expand Down

0 comments on commit b6c6ca8

Please sign in to comment.