Skip to content

Commit 885b6f5

Browse files
committed
Fix TCK tests not being run
At some point looks like the TCK tests stopped getting run as part of the normal `mvn install` invocation.
1 parent ad3bd52 commit 885b6f5

File tree

3 files changed

+59
-1
lines changed

3 files changed

+59
-1
lines changed

core/sdk-core/pom.xml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,33 @@
170170
</dependencies>
171171
<build>
172172
<plugins>
173+
<!-- The Reactive Streams TCK tests are based on TestNG. See http://maven.apache.org/surefire/maven-surefire-plugin/examples/testng.html#Running_TestNG_and_JUnit_Tests -->
174+
<plugin>
175+
<groupId>org.apache.maven.plugins</groupId>
176+
<artifactId>maven-surefire-plugin</artifactId>
177+
<version>${maven.surefire.version}</version>
178+
<configuration>
179+
<properties>
180+
<property>
181+
<name>junit</name>
182+
<value>false</value>
183+
</property>
184+
</properties>
185+
<threadCount>1</threadCount>
186+
</configuration>
187+
<dependencies>
188+
<dependency>
189+
<groupId>org.apache.maven.surefire</groupId>
190+
<artifactId>surefire-junit47</artifactId>
191+
<version>${maven.surefire.version}</version>
192+
</dependency>
193+
<dependency>
194+
<groupId>org.apache.maven.surefire</groupId>
195+
<artifactId>surefire-testng</artifactId>
196+
<version>${maven.surefire.version}</version>
197+
</dependency>
198+
</dependencies>
199+
</plugin>
173200
<plugin>
174201
<groupId>org.codehaus.mojo</groupId>
175202
<artifactId>build-helper-maven-plugin</artifactId>

http-clients/netty-nio-client/pom.xml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,33 @@
151151

152152
<build>
153153
<plugins>
154+
<!-- The Reactive Streams TCK tests are based on TestNG. See http://maven.apache.org/surefire/maven-surefire-plugin/examples/testng.html#Running_TestNG_and_JUnit_Tests -->
155+
<plugin>
156+
<groupId>org.apache.maven.plugins</groupId>
157+
<artifactId>maven-surefire-plugin</artifactId>
158+
<version>${maven.surefire.version}</version>
159+
<configuration>
160+
<properties>
161+
<property>
162+
<name>junit</name>
163+
<value>false</value>
164+
</property>
165+
</properties>
166+
<threadCount>1</threadCount>
167+
</configuration>
168+
<dependencies>
169+
<dependency>
170+
<groupId>org.apache.maven.surefire</groupId>
171+
<artifactId>surefire-junit47</artifactId>
172+
<version>${maven.surefire.version}</version>
173+
</dependency>
174+
<dependency>
175+
<groupId>org.apache.maven.surefire</groupId>
176+
<artifactId>surefire-testng</artifactId>
177+
<version>${maven.surefire.version}</version>
178+
</dependency>
179+
</dependencies>
180+
</plugin>
154181
<plugin>
155182
<groupId>org.apache.maven.plugins</groupId>
156183
<artifactId>maven-jar-plugin</artifactId>

http-clients/netty-nio-client/src/test/java/software/amazon/awssdk/http/nio/netty/internal/FullResponseContentPublisherTckTest.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import io.netty.util.Attribute;
2525
import io.netty.util.AttributeKey;
2626
import java.nio.ByteBuffer;
27+
import java.util.concurrent.CompletableFuture;
2728
import org.reactivestreams.Publisher;
2829
import org.reactivestreams.tck.PublisherVerification;
2930
import org.reactivestreams.tck.TestEnvironment;
@@ -35,6 +36,8 @@
3536
public class FullResponseContentPublisherTckTest extends PublisherVerification<ByteBuffer> {
3637
private static final byte[] CONTENT = new byte[16];
3738

39+
private CompletableFuture<Void> executeFuture;
40+
3841
private ChannelHandlerContext mockCtx = mock(ChannelHandlerContext.class);
3942

4043
@SuppressWarnings("unchecked")
@@ -43,6 +46,7 @@ public void methodSetup() {
4346
Channel chan = mock(Channel.class);
4447
when(mockCtx.channel()).thenReturn(chan);
4548
when(chan.attr(any(AttributeKey.class))).thenReturn(mock(Attribute.class));
49+
executeFuture = new CompletableFuture<>();
4650
}
4751

4852
public FullResponseContentPublisherTckTest() {
@@ -57,7 +61,7 @@ public long maxElementsFromPublisher() {
5761

5862
@Override
5963
public Publisher<ByteBuffer> createPublisher(long l) {
60-
return new ResponseHandler.FullResponseContentPublisher(mockCtx, ByteBuffer.wrap(CONTENT), null);
64+
return new ResponseHandler.FullResponseContentPublisher(mockCtx, ByteBuffer.wrap(CONTENT), executeFuture);
6165
}
6266

6367
@Override

0 commit comments

Comments
 (0)