From 57484553e6bd9065443d06d85be28c16224aa501 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Tue, 4 Oct 2011 23:36:57 +0100 Subject: [PATCH] tests: use a lot higher timeouts This makes the tests more robust on a machine which is loaded. Also, it makes the tests run (significantly) longer if anything goes wrong. --- testcases/t/lib/i3test.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/testcases/t/lib/i3test.pm b/testcases/t/lib/i3test.pm index 9230c5ef..cf29d7b9 100644 --- a/testcases/t/lib/i3test.pm +++ b/testcases/t/lib/i3test.pm @@ -115,7 +115,7 @@ sub wait_for_event { # make sure to include 'structure_notify' in the window’s event_mask attribute sub wait_for_map { my ($x) = @_; - wait_for_event $x, 1, sub { $_[0]->{response_type} == MAP_NOTIFY }; + wait_for_event $x, 2, sub { $_[0]->{response_type} == MAP_NOTIFY }; } # Wrapper around wait_for_event which waits for UNMAP_NOTIFY. Also calls @@ -123,7 +123,7 @@ sub wait_for_map { # event. sub wait_for_unmap { my ($x) = @_; - wait_for_event $x, 1, sub { $_[0]->{response_type} == UNMAP_NOTIFY }; + wait_for_event $x, 2, sub { $_[0]->{response_type} == UNMAP_NOTIFY }; sync_with_i3($x); } @@ -325,7 +325,7 @@ sub sync_with_i3 { $_sync_window->map; - wait_for_event $x, 0.5, sub { $_[0]->{response_type} == MAP_NOTIFY }; + wait_for_event $x, 2, sub { $_[0]->{response_type} == MAP_NOTIFY }; } my $root = $x->get_root_window(); @@ -351,7 +351,7 @@ sub sync_with_i3 { $x->send_event(0, $root, EVENT_MASK_SUBSTRUCTURE_REDIRECT, $msg); # now wait until the reply is here - return wait_for_event $x, 1, sub { + return wait_for_event $x, 2, sub { my ($event) = @_; # TODO: const return 0 unless $event->{response_type} == 161; -- 2.39.5