def test_large_packet(self):
        to_send = b"abcd" * 200000 # something "big enough"
        assert snakemq.packeter.SEND_BLOCK_SIZE > len(to_send)
        container = {"received": None}

        def server(link, packeter):
            def on_recv(conn_id, packet):
                container["received"] = packet
                link.close(conn_id)

            def on_disconnect(conn_id):
                link.stop()

            packeter.on_packet_recv = on_recv
            packeter.on_disconnect = on_disconnect
            link.loop(runtime=LOOP_RUNTIME)

        def client(link, packeter):
            def on_connect(conn_id):
                packeter.send_packet(conn_id, to_send)

            def on_disconnect(conn_id):
                link.stop()

            packeter.on_connect = on_connect
            packeter.on_disconnect = on_disconnect
            link.loop(runtime=LOOP_RUNTIME)

        self.run_srv_cli(server, client)
        self.assertEqual(to_send, container["received"],
                        (len(to_send), len(container["received"])))

    ########################################################
dataset/ETHPy150Open dsiroky/snakemq/tests/unittests/tests_packeter.py/TestPacketer.test_large_packet/swapped operands of `>`