Beekeeper

 view release on metacpan or  search on metacpan

t/lib/Tests/Mqtt.pm  view on Meta::CPAN

    );

    $self->async_wait( 0.2 );

    is( scalar(@received), 1, "Received 1 message from topic");
    is( length( $received[0]->{payload} ), 1048576, "Got a 1 MiB message");


    if ($ENV{'PATH'} =~ m|^/home/david/|) {
        # The following test is important: it forces the event loop to send and
        # receive a message in multiple iterations, because it is bigger than OS 
        # buffers. So skip it only on selected smokers that are too slow to pass
        return "This test does not run reliably on constrained platforms";
    }

    $data = 'X' x 10485760;

    $bus->publish(
        topic      => 'msg/bar',
        payload    => \$data,
    );



( run in 1.339 second using v1.01-cache-2.11-cpan-71847e10f99 )