Include correct dependencies for testsuite-shading on windows. (#8491)

Motivation:

We missed to include a profile for windows which means that we did not have the correct dependencies setup.

Modifications:

- Add missing profile
- Add assumeFalse(...) to ensure we do only test the native transpot shading on non windows platforms.
- Explicit specify dependency on netty-common

Result:

Fixes https://github.com/netty/netty/issues/8489.
This commit is contained in:
Norman Maurer 2018-11-12 20:59:44 +01:00 committed by GitHub
parent c0dfb568a2
commit 88e4817cef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 48 additions and 0 deletions

View File

@ -65,6 +65,35 @@
</dependency>
</dependencies>
<profiles>
<profile>
<id>windows</id>
<activation>
<os>
<family>windows</family>
</os>
</activation>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netty-common</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netty-handler</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>${tcnative.artifactId}</artifactId>
<version>${tcnative.version}</version>
<classifier>${tcnative.classifier}</classifier>
<scope>compile</scope>
</dependency>
</dependencies>
</profile>
<profile>
<id>mac</id>
<activation>
@ -76,6 +105,12 @@
<nativeTransportLib>netty_transport_native_kqueue_${os.detected.arch}.jnilib</nativeTransportLib>
</properties>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netty-common</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netty-transport-native-kqueue</artifactId>
@ -214,6 +249,12 @@
<nativeTransportLib>netty_transport_native_epoll_${os.detected.arch}.so</nativeTransportLib>
</properties>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netty-common</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netty-transport-native-epoll</artifactId>

View File

@ -17,6 +17,7 @@ package io.netty.testsuite.shading;
import io.netty.util.internal.PlatformDependent;
import org.junit.Test;
import org.junit.Assume;
import java.lang.reflect.Method;
@ -27,6 +28,9 @@ public class ShadingIT {
@Test
public void testShadingNativeTransport() throws Exception {
// Skip on windows.
Assume.assumeFalse(PlatformDependent.isWindows());
String className = PlatformDependent.isOsx() ?
"io.netty.channel.kqueue.KQueue" : "io.netty.channel.epoll.Epoll";
testShading0(SHADING_PREFIX, className);
@ -35,6 +39,9 @@ public class ShadingIT {
@Test
public void testShadingTcnative() throws Exception {
// Skip on windows.
Assume.assumeFalse(PlatformDependent.isWindows());
String className = "io.netty.handler.ssl.OpenSsl";
testShading0(SHADING_PREFIX, className);
testShading0(SHADING_PREFIX2, className);