File: handle-test-timeouts.patch

package info (click to toggle)
libanyevent-yubico-perl 0.9.3-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 120 kB
  • sloc: perl: 137; makefile: 4
file content (28 lines) | stat: -rw-r--r-- 1,036 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Description: Handle test timeouts
 Message from referenced upstream pull request:
 .
 Computers are fast. Put a couple extra zeros in the timeout value appears to
 be necessary.
 .
 Also... keep on using the dummy (http://127.0.0.1:0) through the timeout
 test; this allows the test to pass. Why, I have no idea, but it won't pass
 for me otherwise.
Origin: upstream, https://github.com/Yubico/yubico-perl-client/pull/2
Last-Update: 2016-06-05
---
--- a/t/AnyEvent-Yubico.t
+++ b/t/AnyEvent-Yubico.t
@@ -39,11 +39,11 @@
 
 is($validator->verify_async("vvgnkjjhndihvgdftlubvujrhtjnllfjneneugijhfll")->recv()->{status}, "Connection refused", "invalid URL");
 
-$validator->{urls} = $default_urls;
-$validator->{local_timeout} = 0.01;
+$validator->{local_timeout} = 0.0001;
 
 is($validator->verify_sync("vvgnkjjhndihvgdftlubvujrhtjnllfjneneugijhfll")->{status}, "Connection timed out", "timeout");
 
+$validator->{urls} = $default_urls;
 $validator->{local_timeout} = 30.0;
 
 subtest 'Tests that require access to the Internet' => sub {