This method tests if the server starts up successfully
(self)
| 39 | self.service.wait() |
| 40 | |
| 41 | def test_server_startup(self): |
| 42 | """ |
| 43 | This method tests if the server starts up successfully |
| 44 | """ |
| 45 | time.sleep(20) |
| 46 | try: |
| 47 | self.setUp() |
| 48 | with grpc.insecure_channel("localhost:50051") as channel: |
| 49 | stub = backend_pb2_grpc.BackendStub(channel) |
| 50 | response = stub.Health(backend_pb2.HealthMessage()) |
| 51 | self.assertEqual(response.message, b'OK') |
| 52 | except Exception as err: |
| 53 | print(err) |
| 54 | self.fail("Server failed to start") |
| 55 | finally: |
| 56 | self.tearDown() |
| 57 | |
| 58 | def test_load_model(self): |
| 59 | """ |