Start 6.0 version

* Upgrade to Java 17, SF-6.0, Gradle 7.2
* Upgrade to Jakarta dependencies and respective namespaces
* Fix some tests for Java 17 compatibility
* Fix wrong Javadocs
* Add some missed Javadocs
* Fix more `jakarta` namespace
* Fix WS & XML modules to use Jakarta EE
* `--add-opens` in some modules for their reflection-based tests
* Disable Kafka tests which does not work on Windows; see Apache Kafka `3.0.1`
* Upgrade to JUnit `5.8.1`
* Migrate JMS tests to Artemis
* Remove RMI module as it was deprecated before
* Fix `pr-build-workflow.yml` for Java 17
* Fix JavaDocs warnings using `Xdoclint:syntax` per module, not in the top-level `api` task
* Move docs for version `6.0`
This commit is contained in:
Artem Bilan
2021-11-03 09:38:10 -04:00
parent 4423e43cd8
commit a80b22638d
225 changed files with 2196 additions and 2628 deletions

View File

@@ -19,7 +19,10 @@ package org.springframework.integration.stomp.client;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
import org.apache.activemq.broker.BrokerService;
import org.apache.activemq.artemis.api.core.SimpleString;
import org.apache.activemq.artemis.core.config.impl.ConfigurationImpl;
import org.apache.activemq.artemis.core.server.embedded.EmbeddedActiveMQ;
import org.apache.activemq.artemis.core.settings.impl.AddressSettings;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
@@ -64,21 +67,26 @@ import org.springframework.util.SocketUtils;
*/
public class StompServerIntegrationTests {
private static BrokerService activeMQBroker;
private static final EmbeddedActiveMQ broker = new EmbeddedActiveMQ();
private static ReactorNettyTcpStompClient stompClient;
@BeforeAll
public static void setup() throws Exception {
int port = SocketUtils.findAvailableTcpPort(61613);
activeMQBroker = new BrokerService();
activeMQBroker.addConnector("stomp://127.0.0.1:" + port);
activeMQBroker.setPersistent(false);
activeMQBroker.setUseJmx(false);
activeMQBroker.setEnableStatistics(false);
activeMQBroker.getSystemUsage().getMemoryUsage().setLimit(1024 * 1024 * 5);
activeMQBroker.getSystemUsage().getTempUsage().setLimit(1024 * 1024 * 5);
activeMQBroker.start();
ConfigurationImpl configuration =
new ConfigurationImpl()
.setName("embedded-server")
.setPersistenceEnabled(false)
.setSecurityEnabled(false)
.setJMXManagementEnabled(false)
.setJournalDatasync(false)
.addAcceptorConfiguration("stomp", "tcp://127.0.0.1:" + port)
.addAddressesSetting("#",
new AddressSettings()
.setDeadLetterAddress(SimpleString.toSimpleString("dla"))
.setExpiryAddress(SimpleString.toSimpleString("expiry")));
broker.setConfiguration(configuration).start();
stompClient = new ReactorNettyTcpStompClient("127.0.0.1", port);
stompClient.setMessageConverter(new PassThruMessageConverter());
@@ -91,7 +99,7 @@ public class StompServerIntegrationTests {
@AfterAll
public static void teardown() throws Exception {
stompClient.shutdown();
activeMQBroker.stop();
broker.stop();
}
@Test
@@ -191,7 +199,7 @@ public class StompServerIntegrationTests {
assertThat(receive24).isNotNull();
assertThat((byte[]) receive24.getPayload()).isEqualTo("???".getBytes());
activeMQBroker.stop();
broker.stop();
n = 0;
do {
@@ -205,7 +213,7 @@ public class StompServerIntegrationTests {
.isThrownBy(() -> stompOutputChannel1.send(new GenericMessage<>("foo".getBytes())))
.withMessageContaining("could not deliver message");
activeMQBroker.start(false);
broker.start();
n = 0;
do {