def test_server_hello_with_malcolm_client(self):
     block2 = self.process2.make_client_block("hello")
     task = Task("task", self.process2)
     futures = task.when_matches_async(block2["state"], "Ready")
     task.wait_all(futures, timeout=1)
     ret = block2.greet("me2")
     self.assertEqual(ret, dict(greeting="Hello me2"))
 def test_server_hello_with_malcolm_client(self):
     block2 = self.process2.make_client_block("hello")
     task = Task("task", self.process2)
     futures = task.when_matches_async(block2["state"], "Ready")
     task.wait_all(futures, timeout=1)
     ret = block2.greet("me2")
     self.assertEqual(ret, dict(greeting="Hello me2"))
 def test_server_counter_with_malcolm_client(self):
     block2 = self.process2.make_client_block("counter")
     task = Task("task", self.process2)
     futures = task.when_matches_async(block2["state"], "Ready")
     task.wait_all(futures, timeout=1)
     self.assertEqual(block2.counter, 0)
     block2.increment()
     self.assertEqual(block2.counter, 1)
 def test_server_counter_with_malcolm_client(self):
     block2 = self.process2.make_client_block("counter")
     task = Task("task", self.process2)
     futures = task.when_matches_async(block2["state"], "Ready")
     task.wait_all(futures, timeout=1)
     self.assertEqual(block2.counter, 0)
     block2.increment()
     self.assertEqual(block2.counter, 1)