From 70e808040dab5013654ed1156d34bac3d36c263c Mon Sep 17 00:00:00 2001 From: Andrey Zelenkov Date: Mon, 2 Sep 2019 14:55:00 +0300 Subject: Tests: prevented writing non-chopped frames to the closed socket. --- test/test_node_websockets.py | 1 - test/unit/applications/websockets.py | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/test/test_node_websockets.py b/test/test_node_websockets.py index 0703549a..c86ae846 100644 --- a/test/test_node_websockets.py +++ b/test/test_node_websockets.py @@ -818,7 +818,6 @@ class TestNodeWebsockets(TestApplicationNode): self.check_close(sock, 1002) - @unittest.skip('not yet') def test_node_websockets_5_1__5_20(self): self.load('websockets/mirror') diff --git a/test/unit/applications/websockets.py b/test/unit/applications/websockets.py index 47eebd9c..3553af6e 100644 --- a/test/unit/applications/websockets.py +++ b/test/unit/applications/websockets.py @@ -173,7 +173,10 @@ class TestApplicationWebsocket(TestApplicationProto): frame = self.frame_to_send(*args, **kwargs) if chopsize is None: - sock.sendall(frame) + try: + sock.sendall(frame) + except BrokenPipeError: + pass else: pos = 0 -- cgit