Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoakim Erdfelt2014-05-29 14:46:36 -0400
committerJoakim Erdfelt2014-05-29 14:46:36 -0400
commit7412951373e422cbf79549c0f2d1e73da8063fd8 (patch)
treeb7cef3f94e7f4835b0a0ca01611f8476f41a71f5 /jetty-websocket
parent7b3fc2cecf5f9404fb95299066508c6d44029fdc (diff)
downloadorg.eclipse.jetty.project-7412951373e422cbf79549c0f2d1e73da8063fd8.tar.gz
org.eclipse.jetty.project-7412951373e422cbf79549c0f2d1e73da8063fd8.tar.xz
org.eclipse.jetty.project-7412951373e422cbf79549c0f2d1e73da8063fd8.zip
Removing experimental testcase that is no longer relevant
Diffstat (limited to 'jetty-websocket')
-rw-r--r--jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/extensions/compress/DeflateTest.java78
1 files changed, 0 insertions, 78 deletions
diff --git a/jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/extensions/compress/DeflateTest.java b/jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/extensions/compress/DeflateTest.java
deleted file mode 100644
index d30557ebaa..0000000000
--- a/jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/extensions/compress/DeflateTest.java
+++ /dev/null
@@ -1,78 +0,0 @@
-//
-// ========================================================================
-// Copyright (c) 1995-2014 Mort Bay Consulting Pty. Ltd.
-// ------------------------------------------------------------------------
-// All rights reserved. This program and the accompanying materials
-// are made available under the terms of the Eclipse Public License v1.0
-// and Apache License v2.0 which accompanies this distribution.
-//
-// The Eclipse Public License is available at
-// http://www.eclipse.org/legal/epl-v10.html
-//
-// The Apache License v2.0 is available at
-// http://www.opensource.org/licenses/apache2.0.php
-//
-// You may elect to redistribute this code under either of these licenses.
-// ========================================================================
-//
-
-package org.eclipse.jetty.websocket.common.extensions.compress;
-
-import java.nio.ByteBuffer;
-import java.util.zip.Deflater;
-
-import org.eclipse.jetty.util.StringUtil;
-import org.eclipse.jetty.websocket.common.util.Hex;
-import org.junit.Ignore;
-import org.junit.Test;
-
-public class DeflateTest
-{
- private int bufSize = 8 * 1024;
-
- public String deflate(String inputHex, Deflater deflater, int flushMode)
- {
- byte uncompressed[] = Hex.asByteArray(inputHex);
- deflater.reset();
- deflater.setInput(uncompressed,0,uncompressed.length);
- if (flushMode != Deflater.SYNC_FLUSH)
- deflater.finish();
-
- ByteBuffer out = ByteBuffer.allocate(bufSize);
- byte buf[] = new byte[64];
-
- int len = deflater.deflate(buf,0,buf.length,flushMode);
- out.put(buf,0,len);
-
- out.flip();
- return Hex.asHex(out);
- }
-
- @Test
- @Ignore("noisy")
- public void deflateAllTypes()
- {
- int levels[] = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
- boolean nowraps[] = new boolean[] { true, false };
- int strategies[] = new int[] { Deflater.DEFAULT_STRATEGY, Deflater.FILTERED, Deflater.HUFFMAN_ONLY };
- int flushmodes[] = new int[] { Deflater.NO_FLUSH, Deflater.SYNC_FLUSH, Deflater.FULL_FLUSH };
-
- String inputHex = Hex.asHex(StringUtil.getUtf8Bytes("time:"));
- for (int level : levels)
- {
- for (boolean nowrap : nowraps)
- {
- Deflater deflater = new Deflater(level,nowrap);
- for (int strategy : strategies)
- {
- deflater.setStrategy(strategy);
- for (int flushmode : flushmodes)
- {
- String result = deflate(inputHex,deflater,flushmode);
- System.out.printf("%d | %b | %d | %d | \"%s\"%n",level,nowrap,strategy,flushmode,result);
- }
- }
- }
- }
- }
-}

Back to the top