You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jakarta.apache.org by se...@apache.org on 2010/11/03 12:21:47 UTC
svn commit: r1030415 -
/jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/TestHTTPSamplersAgainstHttpMirrorServer.java
Author: sebb
Date: Wed Nov 3 11:21:47 2010
New Revision: 1030415
URL: http://svn.apache.org/viewvc?rev=1030415&view=rev
Log:
// Temporary hack to allow tests to complete on Sun Java 1.6.0_22
Modified:
jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/TestHTTPSamplersAgainstHttpMirrorServer.java
Modified: jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/TestHTTPSamplersAgainstHttpMirrorServer.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/TestHTTPSamplersAgainstHttpMirrorServer.java?rev=1030415&r1=1030414&r2=1030415&view=diff
==============================================================================
--- jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/TestHTTPSamplersAgainstHttpMirrorServer.java (original)
+++ jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/TestHTTPSamplersAgainstHttpMirrorServer.java Wed Nov 3 11:21:47 2010
@@ -88,6 +88,9 @@ public class TestHTTPSamplersAgainstHttp
output.write(TEST_FILE_CONTENT);
output.flush();
output.close();
+ // Temporary hack to allow tests to complete on Sun Java 1.6.0_22
+ // See: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6996110
+ System.setProperty("sun.net.http.allowRestrictedHeaders", "true");
}
@Override
@@ -97,6 +100,7 @@ public class TestHTTPSamplersAgainstHttp
httpServer = null;
// delete temporay file
temporaryFile.delete();
+ System.setProperty("sun.net.http.allowRestrictedHeaders", "false");
}
};
return setup;
@@ -1008,8 +1012,11 @@ public class TestHTTPSamplersAgainstHttp
private void checkHeaderTypeLength(String requestHeaders, String contentType, int contentLen) {
boolean typeOK = isInRequestHeaders(requestHeaders, HTTPSamplerBase.HEADER_CONTENT_TYPE, contentType);
boolean lengOK = isInRequestHeaders(requestHeaders, HTTPSamplerBase.HEADER_CONTENT_LENGTH, Integer.toString(contentLen));
- if (!typeOK || !lengOK){
- fail("Expected type:" + contentType + " & length: " +contentLen + " in:\n"+ requestHeaders);
+ if (!typeOK){
+ fail("Expected type:" + contentType + " in:\n"+ requestHeaders);
+ }
+ if (!lengOK){
+ fail("Expected & length: " +contentLen + " +");
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org