diff --git a/src/client.rs b/src/client.rs index 74a8d4283..61f29d0c6 100644 --- a/src/client.rs +++ b/src/client.rs @@ -462,7 +462,8 @@ where | Err(Error(ErrorKind::Io(_), _)) | Err(Error(ErrorKind::PongTimeout, _)) | Err(Error(ErrorKind::RepeatUaidDisconnect, _)) - | Err(Error(ErrorKind::ExcessivePing, _)) => None, + | Err(Error(ErrorKind::ExcessivePing, _)) + | Err(Error(ErrorKind::InvalidStateTransition(_, _), _)) => None, Err(e) => Some(e), } }; diff --git a/tests/test_integration.py b/tests/test_integration.py index 3d29bc9ed..1048fabb4 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -117,6 +117,11 @@ def sentry_handler(): } +class CustomClient(Client): + def send_bad_data(self): + self.ws.send("bad-data") + + def setup_module(): global CN_SERVER, CN_QUEUES, CN_MP_SERVER, MOCK_SERVER_THREAD ap_tests.ddb_jar = os.path.join(root_dir, "ddb", "DynamoDBLocal.jar") @@ -303,14 +308,10 @@ def _ws_url(self): @inlineCallbacks def test_sentry_output(self): - client = Client(self._ws_url) + client = CustomClient(self._ws_url) yield client.connect() yield client.hello() - # Send a duplicate hello - try: - yield client.hello() - except ValueError: - pass + yield client.send_bad_data() yield self.shut_down(client) data = MOCK_SENTRY_QUEUE.get(timeout=1) assert data["exception"]["values"][0]["value"].startswith("invalid")