Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance Tests #28

Merged
merged 2 commits into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions pubsub-plus-connector/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,6 @@
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

import io.quarkiverse.solace.base.SolaceContainer;
import io.quarkiverse.solace.base.WeldTestBase;
import io.quarkiverse.solace.incoming.SolaceInboundMessage;
import io.quarkiverse.solace.incoming.SolaceIncomingChannel;
import io.quarkiverse.solace.logging.SolaceTestAppender;
import io.smallrye.mutiny.Multi;
Expand All @@ -50,7 +51,7 @@ void consumer() {
.with("mp.messaging.incoming.in.consumer.queue.name", queue)
.with("mp.messaging.incoming.in.consumer.queue.add-additional-subscriptions", "true")
.with("mp.messaging.incoming.in.consumer.queue.missing-resource-creation-strategy", "create-on-start")
.with("mp.messaging.incoming.in.consumer.queue.subscriptions", topic);
.with("mp.messaging.incoming.in.consumer.queue.subscriptions", "quarkus/integration/test/replay/messages");
ozangunalp marked this conversation as resolved.
Show resolved Hide resolved

// Run app that consumes messages
MyConsumer app = runApplication(config, MyConsumer.class);
Expand All @@ -59,7 +60,7 @@ void consumer() {
PersistentMessagePublisher publisher = messagingService.createPersistentMessagePublisherBuilder()
.build()
.start();
Topic tp = Topic.of(topic);
Topic tp = Topic.of("quarkus/integration/test/replay/messages");
publisher.publish("1", tp);
publisher.publish("2", tp);
publisher.publish("3", tp);
Expand All @@ -79,7 +80,7 @@ void consumerReplay() {
.with("mp.messaging.incoming.in.consumer.queue.type", "durable-exclusive")
.with("mp.messaging.incoming.in.consumer.queue.add-additional-subscriptions", "true")
.with("mp.messaging.incoming.in.consumer.queue.missing-resource-creation-strategy", "create-on-start")
.with("mp.messaging.incoming.in.consumer.queue.subscriptions", topic)
.with("mp.messaging.incoming.in.consumer.queue.subscriptions", "quarkus/integration/test/replay/messages")
.with("mp.messaging.incoming.in.consumer.queue.replay.strategy", "all-messages");

// Run app that consumes messages
Expand Down Expand Up @@ -294,8 +295,9 @@ static class MyConsumer {
private final List<String> received = new CopyOnWriteArrayList<>();

@Incoming("in")
void in(InboundMessage msg) {
received.add(msg.getPayloadAsString());
CompletionStage<Void> in(SolaceInboundMessage<byte[]> msg) {
received.add(msg.getMessage().getPayloadAsString());
return msg.ack();
}

public List<String> getReceived() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class SolaceProcessorTest extends WeldTestBase {

@Test
void consumer() {
String processedTopic = topic + "-processed";
String processedTopic = topic + "/processed";
MapBasedConfig config = new MapBasedConfig()
.with("mp.messaging.incoming.in.connector", "quarkus-solace")
.with("mp.messaging.incoming.in.consumer.queue.add-additional-subscriptions", "true")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ public class SolaceBaseTest {
public void initTopic(TestInfo testInfo) {
String cn = testInfo.getTestClass().map(Class::getSimpleName).orElse(UUID.randomUUID().toString());
String mn = testInfo.getTestMethod().map(Method::getName).orElse(UUID.randomUUID().toString());
// topic = cn + "/" + mn + "/" + UUID.randomUUID().getMostSignificantBits();
topic = "quarkus/integration/test/default/topic";
topic = "quarkus/integration/test/default/" + cn + "/" + mn + "/" + UUID.randomUUID().getMostSignificantBits();
}

@BeforeEach
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,10 @@ public void startSolaceBroker() {
solace = createSolaceContainer()
.withCredentials("user", "pass")
.withExposedPorts(SolaceContainer.Service.SMF.getPort())
.withPublishTopic("quarkus/integration/test/default/topic", SolaceContainer.Service.SMF)
.withPublishTopic("quarkus/integration/test/provisioned/queue/topic", SolaceContainer.Service.SMF)
.withPublishTopic("quarkus/integration/test/provisioned/queue/error/topic", SolaceContainer.Service.SMF)
.withPublishTopic("quarkus/integration/test/dynamic/topic/1", SolaceContainer.Service.SMF)
.withPublishTopic("quarkus/integration/test/dynamic/topic/2", SolaceContainer.Service.SMF)
.withPublishTopic("quarkus/integration/test/dynamic/topic/3", SolaceContainer.Service.SMF)
.withPublishTopic("quarkus/integration/test/dynamic/topic/4", SolaceContainer.Service.SMF)
.withPublishTopic("quarkus/integration/test/dynamic/topic/5", SolaceContainer.Service.SMF)
.withPublishTopic("quarkus/integration/test/default/topic-processed", SolaceContainer.Service.SMF);
.withPublishTopic("quarkus/integration/test/replay/messages", SolaceContainer.Service.SMF)
.withPublishTopic("quarkus/integration/test/default/>", SolaceContainer.Service.SMF)
.withPublishTopic("quarkus/integration/test/provisioned/queue/>", SolaceContainer.Service.SMF)
.withPublishTopic("quarkus/integration/test/dynamic/>", SolaceContainer.Service.SMF);
solace.start();
LOGGER.info("Solace broker started: " + solace.getOrigin(SolaceContainer.Service.SMF));
await().until(() -> solace.isRunning());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import io.smallrye.reactive.messaging.health.HealthReport;
import io.smallrye.reactive.messaging.test.common.config.MapBasedConfig;

public class SolaceProducerHealthCheck extends WeldTestBase {
public class SolacePublisherHealthCheck extends WeldTestBase {
@Test
void publisherHealthCheck() {
MapBasedConfig config = new MapBasedConfig()
Expand Down
Loading