Tweak tests

pull/1312/head
Craig Tiller 10 years ago
parent c8a2299fe8
commit 12088b26d9
  1. 9
      src/python/src/grpc/_adapter/_low_test.py
  2. 2
      test/cpp/end2end/end2end_test.cc

@ -43,7 +43,7 @@ _BYTE_SEQUENCE_SEQUENCE = tuple(
bytes(bytearray((row + column) % 256 for column in range(row)))
for row in range(_STREAM_LENGTH))
"""
class LonelyClientTest(unittest.TestCase):
def testLonelyClient(self):
@ -295,7 +295,7 @@ class EchoTest(unittest.TestCase):
def testManyManyByteEchoes(self):
self._perform_echo_test(_BYTE_SEQUENCE_SEQUENCE)
"""
class CancellationTest(unittest.TestCase):
@ -392,7 +392,8 @@ class CancellationTest(unittest.TestCase):
finish_event = self.client_completion_queue.get(_FUTURE)
self.assertEqual(_low.Event.Kind.FINISH, finish_event.kind)
self.assertEqual(_low.Status(_low.Code.CANCELLED, ''), finish_event.status)
self.assertEqual(_low.Status(_low.Code.CANCELLED, 'Cancelled'),
finish_event.status)
server_timeout_none_event = self.server_completion_queue.get(0)
self.assertIsNone(server_timeout_none_event)
@ -403,11 +404,13 @@ class CancellationTest(unittest.TestCase):
self.assertSequenceEqual(test_data, client_data)
"""
class ExpirationTest(unittest.TestCase):
@unittest.skip('TODO(nathaniel): Expiration test!')
def testExpiration(self):
pass
"""
if __name__ == '__main__':

@ -474,7 +474,7 @@ TEST_F(End2endTest, ClientCancelsRpc) {
Status s = stub_->Echo(&context, request, &response);
cancel_thread.join();
EXPECT_EQ(StatusCode::CANCELLED, s.code());
EXPECT_TRUE(s.details().empty());
EXPECT_EQ(s.details(), "Cancelled");
}
// Server cancels rpc after 1ms

Loading…
Cancel
Save