-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
With this resource we can have more control over async processing and even avoid unnecessary async processing when not needed Signed-off-by: Andrea Lamparelli <a.lamparelli95@gmail.com>
- Loading branch information
Showing
9 changed files
with
669 additions
and
568 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
566 changes: 2 additions & 564 deletions
566
horreum-backend/src/test/java/io/hyperfoil/tools/horreum/svc/TestServiceTest.java
Large diffs are not rendered by default.
Oops, something went wrong.
596 changes: 596 additions & 0 deletions
596
...kend/src/test/java/io/hyperfoil/tools/horreum/svc/TestServiceWithAsyncProcessingTest.java
Large diffs are not rendered by default.
Oops, something went wrong.
36 changes: 36 additions & 0 deletions
36
horreum-backend/src/test/java/io/hyperfoil/tools/horreum/test/AMQPInMemoryResource.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package io.hyperfoil.tools.horreum.test; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
import io.quarkus.test.common.QuarkusTestResourceLifecycleManager; | ||
import io.smallrye.reactive.messaging.memory.InMemoryConnector; | ||
|
||
public class AMQPInMemoryResource implements QuarkusTestResourceLifecycleManager { | ||
@Override | ||
public Map<String, String> start() { | ||
Map<String, String> env = new HashMap<>(); | ||
Map<String, String> props1 = InMemoryConnector.switchIncomingChannelsToInMemory("run-upload-in"); | ||
Map<String, String> props2 = InMemoryConnector.switchOutgoingChannelsToInMemory("run-upload-out"); | ||
Map<String, String> props3 = InMemoryConnector.switchIncomingChannelsToInMemory("dataset-event-in"); | ||
Map<String, String> props4 = InMemoryConnector.switchOutgoingChannelsToInMemory("dataset-event-out"); | ||
Map<String, String> props5 = InMemoryConnector.switchIncomingChannelsToInMemory("run-recalc-in"); | ||
Map<String, String> props6 = InMemoryConnector.switchOutgoingChannelsToInMemory("run-recalc-out"); | ||
Map<String, String> props7 = InMemoryConnector.switchIncomingChannelsToInMemory("schema-sync-in"); | ||
Map<String, String> props8 = InMemoryConnector.switchOutgoingChannelsToInMemory("schema-sync-out"); | ||
env.putAll(props1); | ||
env.putAll(props2); | ||
env.putAll(props3); | ||
env.putAll(props4); | ||
env.putAll(props5); | ||
env.putAll(props6); | ||
env.putAll(props7); | ||
env.putAll(props8); | ||
return env; | ||
} | ||
|
||
@Override | ||
public void stop() { | ||
InMemoryConnector.clear(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
horreum-backend/src/test/java/io/hyperfoil/tools/horreum/test/InMemoryAMQTestProfile.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package io.hyperfoil.tools.horreum.test; | ||
|
||
import java.util.Arrays; | ||
import java.util.List; | ||
|
||
import io.quarkus.test.oidc.server.OidcWiremockTestResource; | ||
|
||
public class InMemoryAMQTestProfile extends HorreumTestProfile { | ||
|
||
@Override | ||
public List<TestResourceEntry> testResources() { | ||
return Arrays.asList( | ||
new TestResourceEntry(PostgresResource.class), | ||
new TestResourceEntry(OidcWiremockTestResource.class), | ||
new TestResourceEntry(AMQPInMemoryResource.class)); | ||
} | ||
} |