Skip to content

Commit 0686543

Browse files
committed
Remove test as requested by @aherbert
1 parent a1712d8 commit 0686543

1 file changed

Lines changed: 0 additions & 34 deletions

File tree

src/test/java/org/apache/commons/codec/binary/Base16Test.java

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import org.apache.commons.codec.DecoderException;
2222
import org.apache.commons.codec.EncoderException;
2323
import org.apache.commons.lang3.ArrayUtils;
24-
import org.junit.Assume;
2524
import org.junit.Test;
2625

2726
import java.nio.charset.Charset;
@@ -478,39 +477,6 @@ private String toString(final byte[] data) {
478477
return buf.toString();
479478
}
480479

481-
/**
482-
* Test for CODEC-265: Encode a ~1GiB file.
483-
*
484-
* @see <a href="https://issues.apache.org/jira/projects/CODEC/issues/CODEC-265">CODEC-265</a>
485-
*/
486-
@Test
487-
public void testCodec265_over() {
488-
// almost 1GiB file to encode: 2^29 bytes
489-
final int size1GiB = 1 << 29;
490-
491-
// Expecting a size of 2 output bytes per 1 input byte
492-
final int blocks = size1GiB;
493-
final int expectedLength = 2 * blocks;
494-
495-
// This test is memory hungry. Check we can run it.
496-
final long presumableFreeMemory = BaseNCodecTest.getPresumableFreeMemory();
497-
498-
// Estimate the maximum memory required:
499-
// 1GiB + 1GiB + ~2GiB + ~1.33GiB + 32 KiB = ~5.33GiB
500-
//
501-
// 1GiB: Input buffer to encode
502-
// 1GiB: Existing working buffer (due to doubling of default buffer size of 8192)
503-
// ~2GiB: New working buffer to allocate (due to doubling)
504-
// ~1.33GiB: Expected output size (since the working buffer is copied at the end)
505-
// 32KiB: Some head room
506-
final long estimatedMemory = (long) size1GiB * 4 + expectedLength + 32 * 1024;
507-
Assume.assumeTrue("Not enough free memory for the test", presumableFreeMemory > estimatedMemory);
508-
509-
final byte[] bytes = new byte[size1GiB];
510-
final byte[] encoded = new Base16().encode(bytes);
511-
assertEquals(expectedLength, encoded.length);
512-
}
513-
514480
@Test(expected = IllegalArgumentException.class)
515481
public void checkEncodeLengthBounds() {
516482
final Base16 base16 = new Base16();

0 commit comments

Comments
 (0)