|
62 | 62 | def publisher_client() -> Generator[pubsub_v1.PublisherClient, None, None]: |
63 | 63 | yield pubsub_v1.PublisherClient() |
64 | 64 |
|
65 | | -@pytest.fixture(scope="module") |
66 | | -def publisher_client_with_default_compression() -> Generator[pubsub_v1.PublisherClient, None, None]: |
67 | | - yield pubsub_v1.PublisherClient(publisher_options=pubsub_v1.types.PublisherOptions(enable_grpc_compression=True)) |
68 | | - |
69 | | -@pytest.fixture(scope="module") |
70 | | -def publisher_client_with_low_compression() -> Generator[pubsub_v1.PublisherClient, None, None]: |
71 | | - yield pubsub_v1.PublisherClient(publisher_options=pubsub_v1.types.PublisherOptions(enable_grpc_compression=True, compression_bytes_threshold=0)) |
72 | 65 |
|
73 | 66 | @pytest.fixture(scope="module") |
74 | 67 | def regional_publisher_client() -> Generator[pubsub_v1.PublisherClient, None, None]: |
@@ -798,36 +791,6 @@ def eventually_consistent_test() -> None: |
798 | 791 | eventually_consistent_test() |
799 | 792 |
|
800 | 793 |
|
801 | | -def test_listen_for_errors_default_compression( |
802 | | - publisher_client_with_default_compression: pubsub_v1.PublisherClient, |
803 | | - topic: str, |
804 | | - subscription_async: str, |
805 | | - capsys: CaptureFixture[str], |
806 | | -) -> None: |
807 | | - _ = _publish_messages(publisher_client_with_default_compression, topic) |
808 | | - |
809 | | - subscriber.listen_for_errors(PROJECT_ID, SUBSCRIPTION_ASYNC, 5) |
810 | | - |
811 | | - out, _ = capsys.readouterr() |
812 | | - assert subscription_async in out |
813 | | - assert "threw an exception" in out |
814 | | - |
815 | | - |
816 | | -def test_listen_for_errors_low_compression( |
817 | | - publisher_client_with_low_compression: pubsub_v1.PublisherClient, |
818 | | - topic: str, |
819 | | - subscription_async: str, |
820 | | - capsys: CaptureFixture[str], |
821 | | -) -> None: |
822 | | - _ = _publish_messages(publisher_client_with_low_compression, topic) |
823 | | - |
824 | | - subscriber.listen_for_errors(PROJECT_ID, SUBSCRIPTION_ASYNC, 5) |
825 | | - |
826 | | - out, _ = capsys.readouterr() |
827 | | - assert subscription_async in out |
828 | | - assert "threw an exception" in out |
829 | | - |
830 | | - |
831 | 794 | def test_receive_synchronously( |
832 | 795 | publisher_client: pubsub_v1.PublisherClient, |
833 | 796 | topic: str, |
|
0 commit comments