Skip to content

Commit

Permalink
Updated IA test to use CFG timeout on async events.
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardhunter2 committed Oct 3, 2012
1 parent 5968d22 commit f033e3b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
18 changes: 9 additions & 9 deletions ion/agents/instrument/test/test_instrument_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ def test_initialize(self):
Test agent initialize command. This causes creation of
driver process and transition to inactive.
"""

# We start in uninitialized state.
# In this state there is no driver process.
state = self._ia_client.get_agent_state()
Expand Down Expand Up @@ -601,7 +601,7 @@ def test_resource_states(self):
with self.assertRaises(Conflict):
res_state = self._ia_client.get_resource_state()

self._async_event_result.get(timeout=10)
self._async_event_result.get(timeout=CFG.endpoint.receive.timeout)
self.assertGreaterEqual(len(self._events_received), 6)

def test_states(self):
Expand Down Expand Up @@ -669,7 +669,7 @@ def test_states(self):
state = self._ia_client.get_agent_state()
self.assertEqual(state, ResourceAgentState.UNINITIALIZED)

self._async_event_result.get(timeout=10)
self._async_event_result.get(timeout=CFG.endpoint.receive.timeout)
self.assertEquals(len(self._events_received), 8)

def test_get_set(self):
Expand Down Expand Up @@ -734,7 +734,7 @@ def test_get_set(self):
state = self._ia_client.get_agent_state()
self.assertEqual(state, ResourceAgentState.UNINITIALIZED)

self._async_event_result.get(timeout=10)
self._async_event_result.get(timeout=CFG.endpoint.receive.timeout)
self.assertEquals(len(self._events_received), 3)


Expand Down Expand Up @@ -890,10 +890,10 @@ def test_poll(self):
state = self._ia_client.get_agent_state()
self.assertEqual(state, ResourceAgentState.UNINITIALIZED)

self._async_event_result.get(timeout=10)
self._async_event_result.get(timeout=CFG.endpoint.receive.timeout)
self.assertEquals(len(self._events_received), 7)

self._async_sample_result.get(timeout=10)
self._async_sample_result.get(timeout=CFG.endpoint.receive.timeout)
self.assertEquals(len(self._samples_received), 6)

def test_autosample(self):
Expand Down Expand Up @@ -941,10 +941,10 @@ def test_autosample(self):
state = self._ia_client.get_agent_state()
self.assertEqual(state, ResourceAgentState.UNINITIALIZED)

self._async_event_result.get(timeout=10)
self._async_event_result.get(timeout=CFG.endpoint.receive.timeout)
self.assertGreaterEqual(len(self._events_received), 6)

self._async_sample_result.get(timeout=10)
self._async_sample_result.get(timeout=CFG.endpoint.receive.timeout)
self.assertGreaterEqual(len(self._samples_received), 6)

def test_capabilities(self):
Expand Down Expand Up @@ -1334,7 +1334,7 @@ def test_command_errors(self):
state = self._ia_client.get_agent_state()
self.assertEqual(state, ResourceAgentState.UNINITIALIZED)

self._async_event_result.get(timeout=10)
self._async_event_result.get(timeout=CFG.endpoint.receive.timeout)
self.assertEquals(len(self._events_received), 6)

def test_direct_access(self):
Expand Down
2 changes: 0 additions & 2 deletions ion/services/sa/tcaa/test/test_remote_endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,5 +487,3 @@ def test_service_commands(self):
# This will cause the endpoint clients to disconnect and go to sleep.
self.on_link_down()



0 comments on commit f033e3b

Please sign in to comment.