Skip to content

Commit d09c896

Browse files
committed
Netty upgrade 4.1.11 fix #782
1 parent 2736c94 commit d09c896

File tree

4 files changed

+29
-6
lines changed

4 files changed

+29
-6
lines changed

jooby-netty/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<name>netty module</name>
1515

1616
<properties>
17-
<boringssl.version>1.1.33.Fork25</boringssl.version>
17+
<boringssl.version>1.1.33.Fork26</boringssl.version>
1818
</properties>
1919

2020
<build>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
package io.netty.channel.epoll;
2+
3+
import java.util.concurrent.atomic.AtomicBoolean;
4+
5+
/**
6+
* Hack for Epoll test.
7+
*
8+
* @author edgar
9+
*
10+
*/
11+
public class Epoll {
12+
13+
public static final AtomicBoolean available = new AtomicBoolean(false);
14+
15+
public static boolean isAvailable() {
16+
return available.get();
17+
}
18+
19+
public static void ensureAvailability() {
20+
}
21+
22+
public static Throwable unavailabilityCause() {
23+
return null;
24+
}
25+
}

jooby-netty/src/test/java/org/jooby/internal/netty/NettyServerTest.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,13 +178,10 @@ private Block parentThreadFactory(final String name) {
178178
@SuppressWarnings({"unchecked", "rawtypes" })
179179
@Test
180180
public void epollServer() throws Exception {
181+
Epoll.available.set(true);
181182
new MockUnit(HttpHandler.class)
182183
.expect(parentThreadFactory("epoll-boss"))
183184
.expect(unit -> {
184-
185-
unit.mockStatic(Epoll.class);
186-
expect(Epoll.isAvailable()).andReturn(true);
187-
188185
EpollEventLoopGroup eventLoop = unit.constructor(EpollEventLoopGroup.class)
189186
.args(int.class, ThreadFactory.class)
190187
.build(1, unit.get(ThreadFactory.class));
@@ -215,6 +212,7 @@ public void epollServer() throws Exception {
215212
server.stop();
216213
}
217214
});
215+
Epoll.available.set(false);
218216
}
219217

220218
@Test

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2953,7 +2953,7 @@ org.eclipse.jdt.apt.processorOptions/defaultOverwrite=true
29532953
<undertow.version>1.4.9.Final</undertow.version>
29542954
<servlet.version>3.1.0</servlet.version>
29552955
<jetty.version>9.4.3.v20170317</jetty.version>
2956-
<netty.version>4.1.9.Final</netty.version>
2956+
<netty.version>4.1.11.Final</netty.version>
29572957
<javassist.version>3.20.0-GA</javassist.version>
29582958
<javax.ws.rs-api.version>2.0</javax.ws.rs-api.version>
29592959
<slf4j-api.version>1.7.21</slf4j-api.version>

0 commit comments

Comments
 (0)