Comments (8)
I could reproduce this test failure with not only 5.26.0-RC1 but also 5.24.1.
Now httpbin.org returns "X-Processed-Time" header whose length can be changed:
# length("0.0078330039978") == 15
❯ curl -sv http://httpbin.org/ 2>&1 | grep X-Processed-Time
< X-Processed-Time: 0.0078330039978
# length("0.00656604766846") == 16
❯ curl -sv http://httpbin.org/ 2>&1 | grep X-Processed-Time
< X-Processed-Time: 0.00656604766846
It seems that httpbin.org started using Flask-Common which injects "X-Processed-Time" header recently.
https://twitter.com/kennethreitz/status/862695319104094208
So tests that relies on HTTP header length of httpbin.org may fail.
In fact, if we remove "X-Processed-Time" header, then t/rt-112313.t passes.
diff --git a/t/rt-112313.t b/t/rt-112313.t
index f98040d..d33f32d 100644
--- a/t/rt-112313.t
+++ b/t/rt-112313.t
@@ -57,6 +57,14 @@ sub try
my ($code, $mess, @headers) = $s->read_response_headers();
+ # XXX remove X-Processed-Time header
+ for my $i (0..$#headers) {
+ if ($headers[$i] eq 'X-Processed-Time') {
+ splice @headers, $i, 2;
+ last;
+ }
+ }
+
my $body = '';
while ($s->read_entity_body(my $buf, 1024))
{
❯ prove -l t/rt-112313.t
t/rt-112313.t .. ok
All tests successful.
Files=1, Tests=40, 26 wallclock secs ( 0.03 usr 0.01 sys + 0.10 cusr 0.02 csys = 0.16 CPU)
Result: PASS
from net-http.
I created a CPAN.pm distroprefs file with @skaji's patch: https://github.com/eserte/srezic-cpan-distroprefs/blob/master/Net-HTTP.yml
So I can go on with smoking, especially with 5.26.0-RC1 smoking...
from net-http.
Thanks @genehack and @skaji. @genio should we just apply this fix for now to get beyond the immediate problem?
from net-http.
This test started failing mid-day yesterday for me with 5.16-3, the patch gets me past it.
Thanks for the quick work!
from net-http.
6.15 has been uploaded to CPAN. Thanks for your help everyone. :)
from net-http.
still getting the same test failure :(
I downloaded, extracted, the latest Net-HTTP-6.17, on the latest macOS; then I ran:
perl Makefile.PL
followed by
prove -l t/rt-112313.t
I get:
t/rt-112313.t .. 15/?
# Failed test 'ok for n 1635 -> response length -1'
# at t/rt-112313.t line 108.
# error: timeout at t/rt-112313.t line 89.
t/rt-112313.t .. 16/?
# Failed test 'ok for n 1636 -> response length -1'
# at t/rt-112313.t line 108.
# error: timeout at t/rt-112313.t line 89.
....
t/rt-112313.t .. 39/?
# Failed test 'ok for n 2665 -> response length -1'
# at t/rt-112313.t line 108.
# error: timeout at t/rt-112313.t line 89.
# Failed test 'reponse length increased by 1'
# at t/rt-112313.t line 112.
# got: '0'
# expected: '1'
# Looks like you failed 26 tests of 40.
t/rt-112313.t .. Dubious, test returned 26 (wstat 6656, 0x1a00)
Failed 26/40 subtests
Test Summary Report
-------------------
t/rt-112313.t (Wstat: 6656 Tests: 40 Failed: 26)
Failed tests: 15-40
Non-zero exit status: 26
Files=1, Tests=40, 221 wallclock secs ( 0.06 usr 0.02 sys + 0.24 cusr 0.06 csys = 0.38 CPU)
Result: FAIL
did I do anything wrong?
from net-http.
from net-http.
@karenetheridge
here's the full result of make test
:
PERL_DL_NONLAZY=1 "/usr/local/Cellar/perl/5.26.1/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00-report-prereqs.t .. #
# Versions for all modules listed in MYMETA.json (including optional ones):
#
# === Configure Requires ===
#
# Module Want Have
# ------------------- ---- ----
# ExtUtils::MakeMaker any 7.24
#
# === Configure Suggests ===
#
# Module Want Have
# -------- ------- ----------
# JSON::PP 2.27300 2.27400_02
#
# === Build Requires ===
#
# Module Want Have
# ------------------- ---- ----
# ExtUtils::MakeMaker any 7.24
#
# === Test Requires ===
#
# Module Want Have
# ------------------- ---- --------
# Data::Dumper any 2.167
# ExtUtils::MakeMaker any 7.24
# File::Spec any 3.67
# IO::Select any 1.22
# Socket any 2.020_03
# Test::More any 1.302073
#
# === Test Recommends ===
#
# Module Want Have
# ---------- -------- --------
# CPAN::Meta 2.120900 2.150010
#
# === Runtime Requires ===
#
# Module Want Have
# ---------------------- ---- -----
# Carp any 1.42
# Compress::Raw::Zlib any 2.074
# IO::Socket::INET any 1.35
# IO::Uncompress::Gunzip any 2.074
# URI any 1.73
# base any 2.26
# strict any 1.11
# vars any 1.03
# warnings any 1.37
#
# === Runtime Suggests ===
#
# Module Want Have
# ----------------- ----- -----
# IO::Socket any 1.38
# IO::Socket::INET6 any 2.72
# IO::Socket::IP any 0.39
# IO::Socket::SSL 2.012 2.052
# Symbol any 1.08
#
t/00-report-prereqs.t .. ok
t/http-nb.t ............ ok
t/http.t ............... ok
t/live-https.t ......... ok
t/live.t ............... ok
t/rt-112313.t .......... 15/?
# Failed test 'ok for n 1635 -> response length -1'
# at t/rt-112313.t line 108.
# error: timeout at t/rt-112313.t line 89.
t/rt-112313.t .......... 16/?
# Failed test 'ok for n 1636 -> response length -1'
# at t/rt-112313.t line 108.
# error: timeout at t/rt-112313.t line 89.
# Failed test 'reponse length increased by 1'
# at t/rt-112313.t line 112.
# got: '0'
# expected: '1'
t/rt-112313.t .......... 18/?
# Failed test 'ok for n 1637 -> response length -1'
# at t/rt-112313.t line 108.
# error: timeout at t/rt-112313.t line 89.
# Failed test 'reponse length increased by 1'
# at t/rt-112313.t line 112.
# got: '0'
# expected: '1'
t/rt-112313.t .......... 20/?
# Failed test 'ok for n 1638 -> response length -1'
# at t/rt-112313.t line 108.
# error: timeout at t/rt-112313.t line 89.
# Failed test 'reponse length increased by 1'
# at t/rt-112313.t line 112.
# got: '0'
# expected: '1'
t/rt-112313.t .......... 22/?
# Failed test 'ok for n 1639 -> response length -1'
# at t/rt-112313.t line 108.
# error: timeout at t/rt-112313.t line 89.
# Failed test 'reponse length increased by 1'
# at t/rt-112313.t line 112.
# got: '0'
# expected: '1'
t/rt-112313.t .......... 24/?
# Failed test 'ok for n 1640 -> response length -1'
# at t/rt-112313.t line 108.
# error: timeout at t/rt-112313.t line 89.
# Failed test 'reponse length increased by 1'
# at t/rt-112313.t line 112.
# got: '0'
# expected: '1'
t/rt-112313.t .......... 26/?
# Failed test 'ok for n 1641 -> response length -1'
# at t/rt-112313.t line 108.
# error: timeout at t/rt-112313.t line 89.
# Failed test 'reponse length increased by 1'
# at t/rt-112313.t line 112.
# got: '0'
# expected: '1'
t/rt-112313.t .......... 28/?
# Failed test 'ok for n 2659 -> response length -1'
# at t/rt-112313.t line 108.
# error: timeout at t/rt-112313.t line 89.
t/rt-112313.t .......... 29/?
# Failed test 'ok for n 2660 -> response length -1'
# at t/rt-112313.t line 108.
# error: timeout at t/rt-112313.t line 89.
# Failed test 'reponse length increased by 1'
# at t/rt-112313.t line 112.
# got: '0'
# expected: '1'
t/rt-112313.t .......... 31/?
# Failed test 'ok for n 2661 -> response length -1'
# at t/rt-112313.t line 108.
# error: timeout at t/rt-112313.t line 89.
# Failed test 'reponse length increased by 1'
# at t/rt-112313.t line 112.
# got: '0'
# expected: '1'
t/rt-112313.t .......... 33/?
# Failed test 'ok for n 2662 -> response length -1'
# at t/rt-112313.t line 108.
# error: timeout at t/rt-112313.t line 89.
# Failed test 'reponse length increased by 1'
# at t/rt-112313.t line 112.
# got: '0'
# expected: '1'
t/rt-112313.t .......... 35/?
# Failed test 'ok for n 2663 -> response length -1'
# at t/rt-112313.t line 108.
# error: timeout at t/rt-112313.t line 89.
# Failed test 'reponse length increased by 1'
# at t/rt-112313.t line 112.
# got: '0'
# expected: '1'
t/rt-112313.t .......... 37/?
# Failed test 'ok for n 2664 -> response length -1'
# at t/rt-112313.t line 108.
# error: timeout at t/rt-112313.t line 89.
# Failed test 'reponse length increased by 1'
# at t/rt-112313.t line 112.
# got: '0'
# expected: '1'
t/rt-112313.t .......... 39/?
# Failed test 'ok for n 2665 -> response length -1'
# at t/rt-112313.t line 108.
# error: timeout at t/rt-112313.t line 89.
# Failed test 'reponse length increased by 1'
# at t/rt-112313.t line 112.
# got: '0'
# expected: '1'
# Looks like you failed 26 tests of 40.
t/rt-112313.t .......... Dubious, test returned 26 (wstat 6656, 0x1a00)
Failed 26/40 subtests
Test Summary Report
-------------------
t/rt-112313.t (Wstat: 6656 Tests: 40 Failed: 26)
Failed tests: 15-40
Non-zero exit status: 26
Files=6, Tests=104, 225 wallclock secs ( 0.10 usr 0.04 sys + 1.48 cusr 0.28 csys = 1.90 CPU)
Result: FAIL
Failed 1/6 test programs. 26/104 subtests failed.
make: *** [test_dynamic] Error 26
from net-http.
Related Issues (20)
- Live tests fail for v6.14 on Windows 10 Strawberry Perl 5.24.1.1 behind HPE firewall HOT 19
- t/live-https.t fails with IO::Socket::SSL 1.49 HOT 4
- rt-112313 .t failing on timeout HOT 6
- t/live.t started to fail HOT 6
- Warning when producing an error message
- t/live-https.t fails (Server closed connection) HOT 2
- Tyring to install on a new MacOS Sierra 10.12.6, stock perl 15.8.2 [rt.cpan.org #123583]
- Net:HTTP 6.05 dows not work with VMware-vSphere-Perl-SDK [rt.cpan.org #81684]
- can_read issue with Net::SSL [rt.cpan.org #98898]
- Can't install v6.09 in perl 5.14.2 [rt.cpan.org #107351] HOT 1
- Net::HTTP::NB bug with chunked responses when there is a delay around the chunk header [rt.cpan.org #107744]
- Passing the '--live-tests' option to 'perl Makefile.PL' does not DWIM [rt.cpan.org #120779] HOT 1
- Stop using httpbin for live tests
- Net::HTTP::NB blocks on connect() HOT 4
- Problems installing on macOS HOT 3
- Failing Net::HTTP Installation in Perl 5.32.0 HOT 2
- die creates new warning on missing newline
- Improve error message HOT 6
- t/live-https.t fails a header comparison
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from net-http.