Codebase list libpoe-component-sslify-perl / d8b4c0e
fix an incorrect assumption in the connfail tests, thanks CPANTesters Apocalypse 13 years ago
2 changed file(s) with 4 addition(s) and 41 deletion(s). Raw diff Collapse all Expand all
5656 # Thanks to H. Merijn Brand for spotting this FAIL in 5.12.0!
5757 # The default PoCo::Server::TCP handler will throw a warning, which causes Test::NoWarnings to FAIL :(
5858 my ($syscall, $errno, $error) = @_[ ARG0..ARG2 ];
59
60 # Since this test purposefully sends garbage, we expect a connection reset by peer
61 # not ok 7 - Got SERVER read error 104: Connection reset by peer
62
63 # TODO are there other "errors" that is harmless?
6459 $error = "Normal disconnection" unless $error;
65 my $msg = "Got SERVER $syscall error $errno: $error";
66 unless ( $syscall eq 'read' and $errno == 104 ) {
67 fail( $msg );
68 } else {
69 diag( $msg ) if $ENV{TEST_VERBOSE};
70 }
60 diag( "Got SERVER $syscall error $errno: $error" ) if $ENV{TEST_VERBOSE};
7161 },
7262 );
7363
10797 # Thanks to H. Merijn Brand for spotting this FAIL in 5.12.0!
10898 # The default PoCo::Client::TCP handler will throw a warning, which causes Test::NoWarnings to FAIL :(
10999 my ($syscall, $errno, $error) = @_[ ARG0..ARG2 ];
110
111 # TODO are there other "errors" that is harmless?
112100 $error = "Normal disconnection" unless $error;
113 my $msg = "Got CLIENT $syscall error $errno: $error";
114 unless ( $syscall eq 'read' and $errno == 0 ) {
115 fail( $msg );
116 } else {
117 diag( $msg ) if $ENV{TEST_VERBOSE};
118 }
101 diag( "Got CLIENT $syscall error $errno: $error" ) if $ENV{TEST_VERBOSE};
119102 },
120103 );
121104
7777 # Thanks to H. Merijn Brand for spotting this FAIL in 5.12.0!
7878 # The default PoCo::Server::TCP handler will throw a warning, which causes Test::NoWarnings to FAIL :(
7979 my ($syscall, $errno, $error) = @_[ ARG0..ARG2 ];
80
81 # Since this test purposefully sends garbage, we expect a connection reset by peer
82 # not ok 7 - Got SERVER read error 104: Connection reset by peer
83
84 # TODO are there other "errors" that is harmless?
8580 $error = "Normal disconnection" unless $error;
86 my $msg = "Got SERVER $syscall error $errno: $error";
87 unless ( $syscall eq 'read' and $errno == 104 ) {
88 fail( $msg );
89 } else {
90 diag( $msg ) if $ENV{TEST_VERBOSE};
91 }
81 diag( "Got SERVER $syscall error $errno: $error" ) if $ENV{TEST_VERBOSE};
9282 },
9383 );
9484
114104 # Thanks to H. Merijn Brand for spotting this FAIL in 5.12.0!
115105 # The default PoCo::Client::TCP handler will throw a warning, which causes Test::NoWarnings to FAIL :(
116106 my ($syscall, $errno, $error) = @_[ ARG0..ARG2 ];
117
118 # Since this test purposefully sends garbage, we expect a connection reset by peer
119 # not ok 7 - Got SERVER read error 104: Connection reset by peer
120
121 # TODO are there other "errors" that is harmless?
122107 $error = "Normal disconnection" unless $error;
123 my $msg = "Got CLIENT $syscall error $errno: $error";
124 unless ( $syscall eq 'read' and $errno == 104 ) {
125 fail( $msg );
126 } else {
127 diag( $msg ) if $ENV{TEST_VERBOSE};
128 }
108 diag( "Got CLIENT $syscall error $errno: $error" ) if $ENV{TEST_VERBOSE};
129109 },
130110 );
131111