GeezerVison is showing github.com — Fix 4.1 build of AbstractDiskHttpDataTest · netty/netty@d919d81
File tree
Expand file treeCollapse file tree
Open diff view settings
codec-http/src/test/java/io/netty/handler/codec/http/multipart
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: codec-http/src/test/java/io/netty/handler/codec/http/multipart/AbstractDiskHttpDataTest.java +20-3Lines changed: 20 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
20 | 20 | import io.netty.util.internal.PlatformDependent; |
21 | 21 | import org.junit.jupiter.api.Test; |
22 | 22 | import org.junit.jupiter.api.Timeout; |
| 23 | +import org.junit.jupiter.api.function.Executable; |
23 | 24 |
|
24 | 25 | import java.io.EOFException; |
25 | 26 | import java.io.File; |
@@ -89,9 +90,25 @@ public long length() { |
89 | 90 | } |
90 | 91 | }; |
91 | 92 | test.setContent(shortFile); |
92 | | - assertThrows(EOFException.class, test::get); |
93 | | - assertThrows(EOFException.class, test::getByteBuf); |
94 | | - assertThrows(EOFException.class, test::getString); |
| 93 | + final TestHttpData data = test; |
| 94 | + assertThrows(EOFException.class, new Executable() { |
| 95 | + @Override |
| 96 | + public void execute() throws Throwable { |
| 97 | + data.get(); |
| 98 | + } |
| 99 | + }); |
| 100 | + assertThrows(EOFException.class, new Executable() { |
| 101 | + @Override |
| 102 | + public void execute() throws Throwable { |
| 103 | + data.getByteBuf(); |
| 104 | + } |
| 105 | + }); |
| 106 | + assertThrows(EOFException.class, new Executable() { |
| 107 | + @Override |
| 108 | + public void execute() throws Throwable { |
| 109 | + data.getString(); |
| 110 | + } |
| 111 | + }); |
95 | 112 | } finally { |
96 | 113 | test.delete(); |
97 | 114 | assertTrue(tmpFile.delete()); |
|