aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Becker2012-04-12 05:18:15 (EDT)
committerThomas Becker2012-04-12 05:18:15 (EDT)
commit4089f3af779e70c87191394a6d6e2cf50bcbfd2b (patch)
tree7f9250d2c0f224ad5745102ed4e86447be064e1e
parent6f54239cb5b57baa31062e369d0b5c04c09efec6 (diff)
downloadorg.eclipse.jetty.project-4089f3af779e70c87191394a6d6e2cf50bcbfd2b.zip
org.eclipse.jetty.project-4089f3af779e70c87191394a6d6e2cf50bcbfd2b.tar.gz
org.eclipse.jetty.project-4089f3af779e70c87191394a6d6e2cf50bcbfd2b.tar.bz2
376519: adapt GZipFilter tests to follow new default for Deflaterefs/changes/75/5575/1
-rw-r--r--jetty-servlets/src/test/java/org/eclipse/jetty/servlets/GzipWithPipeliningTest.java12
-rw-r--r--jetty-servlets/src/test/java/org/eclipse/jetty/servlets/IncludableGzipFilterTest.java3
-rw-r--r--jetty-servlets/src/test/java/org/eclipse/jetty/servlets/gzip/GzipTester.java3
3 files changed, 13 insertions, 5 deletions
diff --git a/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/GzipWithPipeliningTest.java b/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/GzipWithPipeliningTest.java
index 4144b07..a77d1a3 100644
--- a/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/GzipWithPipeliningTest.java
+++ b/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/GzipWithPipeliningTest.java
@@ -1,7 +1,12 @@
package org.eclipse.jetty.servlets;
-import static org.hamcrest.Matchers.*;
-import static org.junit.Assert.*;
+import static org.hamcrest.Matchers.containsString;
+import static org.hamcrest.Matchers.greaterThan;
+import static org.hamcrest.Matchers.is;
+import static org.hamcrest.Matchers.not;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.assertTrue;
import java.io.File;
import java.io.FileInputStream;
@@ -16,6 +21,7 @@ import java.util.Collection;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.zip.GZIPInputStream;
+import java.util.zip.Inflater;
import java.util.zip.InflaterInputStream;
import org.eclipse.jetty.server.Connector;
@@ -183,7 +189,7 @@ public class GzipWithPipeliningTest
InputStream uncompressedStream = null;
if (GzipFilter.DEFLATE.equals(encodingHeader))
{
- uncompressedStream = new InflaterInputStream(rawInputStream);
+ uncompressedStream = new InflaterInputStream(rawInputStream, new Inflater(true));
}
else
{
diff --git a/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/IncludableGzipFilterTest.java b/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/IncludableGzipFilterTest.java
index 9872c19..6162206 100644
--- a/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/IncludableGzipFilterTest.java
+++ b/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/IncludableGzipFilterTest.java
@@ -25,6 +25,7 @@ import java.io.InputStream;
import java.util.Arrays;
import java.util.Collection;
import java.util.zip.GZIPInputStream;
+import java.util.zip.Inflater;
import java.util.zip.InflaterInputStream;
import javax.servlet.http.HttpServletResponse;
@@ -139,7 +140,7 @@ public class IncludableGzipFilterTest
}
else if (compressionType.equals(GzipFilter.DEFLATE))
{
- testIn = new InflaterInputStream(compressedResponseStream);
+ testIn = new InflaterInputStream(compressedResponseStream, new Inflater(true));
}
ByteArrayOutputStream testOut = new ByteArrayOutputStream();
IO.copy(testIn,testOut);
diff --git a/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/gzip/GzipTester.java b/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/gzip/GzipTester.java
index 36cec80..331975c 100644
--- a/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/gzip/GzipTester.java
+++ b/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/gzip/GzipTester.java
@@ -20,6 +20,7 @@ import java.util.Enumeration;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.zip.GZIPInputStream;
+import java.util.zip.Inflater;
import java.util.zip.InflaterInputStream;
import javax.servlet.Servlet;
@@ -101,7 +102,7 @@ public class GzipTester
}
else if (compressionType.equals(GzipFilter.DEFLATE))
{
- in = new InflaterInputStream(bais);
+ in = new InflaterInputStream(bais, new Inflater(true));
}
out = new ByteArrayOutputStream();
IO.copy(in,out);