Skip to content

Commit ad1a20f

Browse files
strangelookingnerdok2c
authored andcommitted
Remove duplicate test methods
1 parent dc3c4aa commit ad1a20f

File tree

2 files changed

+1
-46
lines changed

2 files changed

+1
-46
lines changed

httpcore5/src/test/java/org/apache/hc/core5/http/impl/nio/TestIdentityEncoder.java

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -191,37 +191,7 @@ void testCodingEmptyFile() throws Exception {
191191
}
192192

193193
@Test
194-
void testCodingFromFileSmaller() throws Exception {
195-
final WritableByteChannelMock channel = new WritableByteChannelMock(64);
196-
final SessionOutputBuffer outbuf = new SessionOutputBufferImpl(1024, 128);
197-
final BasicHttpTransportMetrics metrics = new BasicHttpTransportMetrics();
198-
199-
final IdentityEncoder encoder = new IdentityEncoder(channel, outbuf, metrics);
200-
201-
createTempFile();
202-
RandomAccessFile testfile = new RandomAccessFile(this.tmpfile, "rw");
203-
try {
204-
testfile.write("stuff;".getBytes(StandardCharsets.US_ASCII));
205-
testfile.write("more stuff".getBytes(StandardCharsets.US_ASCII));
206-
} finally {
207-
testfile.close();
208-
}
209-
210-
testfile = new RandomAccessFile(this.tmpfile, "rw");
211-
try {
212-
final FileChannel fchannel = testfile.getChannel();
213-
encoder.transfer(fchannel, 0, 20);
214-
} finally {
215-
testfile.close();
216-
}
217-
final String s = channel.dump(StandardCharsets.US_ASCII);
218-
219-
Assertions.assertFalse(encoder.isCompleted());
220-
Assertions.assertEquals("stuff;more stuff", s);
221-
}
222-
223-
@Test
224-
public void testCodingFromFileFlushBuffer() throws Exception {
194+
void testCodingFromFileFlushBuffer() throws Exception {
225195
final WritableByteChannelMock channel = new WritableByteChannelMock(64);
226196
final SessionOutputBuffer outbuf = new SessionOutputBufferImpl(1024, 128);
227197
final BasicHttpTransportMetrics metrics = new BasicHttpTransportMetrics();

httpcore5/src/test/java/org/apache/hc/core5/http/io/TestEofSensorInputStream.java

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -74,21 +74,6 @@ void testCloseIOError() throws Exception {
7474
Mockito.verify(eofwatcher).streamClosed(inStream);
7575
}
7676

77-
@Test
78-
void testReleaseConnection() throws Exception {
79-
Mockito.when(eofwatcher.streamClosed(Mockito.any())).thenReturn(Boolean.TRUE);
80-
81-
eofstream.close();
82-
83-
Assertions.assertTrue(eofstream.isSelfClosed());
84-
Assertions.assertNull(eofstream.getWrappedStream());
85-
86-
Mockito.verify(inStream, Mockito.times(1)).close();
87-
Mockito.verify(eofwatcher).streamClosed(inStream);
88-
89-
eofstream.close();
90-
}
91-
9277
@Test
9378
void testAbortConnection() throws Exception {
9479
Mockito.when(eofwatcher.streamAbort(Mockito.any())).thenReturn(Boolean.TRUE);

0 commit comments

Comments
 (0)