-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Chore/improve amqp test coverage (#948)
* tests: refactoring + add yaml endpoint testing * tests: additional RabbitListener tests * chore(amqp): fix queue configuration * chore(amqp): simplify local testing * chore: update asyncapi.yaml gradle script * feat(amqp): scan all queues In addition to the routingKeys * test(amqp): update asyncapi artifacts Part of GH-366 * test(ui): use valid mock data * chore(ui): fix formatting * test(amqp): update asyncapi artifacts * feat(ui): show channel bindings * test: add WaitStrategy for ApiSystemTest * chore(amqp): use non-exclusive queue in example * chore(amqp): use non-exclusive queue in example * test(amqp): persist patched asyncapi.yaml * chore(amqp): add spring-messaging dependency in example * test(amqp): wait for ready amqp server * test(amqp): update e2e * test(amqp): cleanup --------- Co-authored-by: Pascal Dal Farra <pascal.dalfarra@spw.wallonie.be>
- Loading branch information
Showing
34 changed files
with
1,007 additions
and
41 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
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
2 changes: 2 additions & 0 deletions
2
springwolf-examples/springwolf-amqp-example/docker-compose.yml
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
41 changes: 41 additions & 0 deletions
41
...ringwolf-amqp-example/src/main/java/io/github/springwolf/examples/amqp/AmqpConstants.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,41 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
package io.github.springwolf.examples.amqp; | ||
|
||
import lombok.AccessLevel; | ||
import lombok.NoArgsConstructor; | ||
|
||
@NoArgsConstructor(access = AccessLevel.PRIVATE) | ||
public final class AmqpConstants { | ||
|
||
// Exchanges | ||
public static final String EXCHANGE_EXAMPLE_TOPIC_EXCHANGE = "example-topic-exchange"; | ||
public static final String EXCHANGE_CRUD_TOPIC_EXCHANGE_1 = "CRUD-topic-exchange-1"; | ||
public static final String EXCHANGE_CRUD_TOPIC_EXCHANGE_2 = "CRUD-topic-exchange-2"; | ||
/** | ||
* Direct Exchange - Routing is based on 'Routing key'. | ||
* Messages are 'routed' towards queue which name is equals to 'routing key' <BR/> | ||
* Note:<BR/> | ||
* The 'Default exchange' is a 'Direct exchange' with an empty name ( name= "") | ||
*/ | ||
public static final String EXCHANGE_DEFAULT_EXCHANGE = ""; | ||
|
||
// Routing keys | ||
/** | ||
* When a queue is bound with "#" (hash) binding key, | ||
* it will receive all the messages, regardless of the routing key - like in fanout exchange. | ||
*/ | ||
public static final String ROUTING_KEY_ALL_MESSAGES = "#"; | ||
|
||
public static final String ROUTING_KEY_EXAMPLE_TOPIC_ROUTING_KEY = "example-topic-routing-key"; | ||
|
||
// Queues | ||
public static final String QUEUE_EXAMPLE_QUEUE = "example-queue"; | ||
public static final String QUEUE_ANOTHER_QUEUE = "another-queue"; | ||
public static final String QUEUE_MULTI_PAYLOAD_QUEUE = "multi-payload-queue"; | ||
public static final String QUEUE_EXAMPLE_BINDINGS_QUEUE = "example-bindings-queue"; | ||
|
||
public static final String QUEUE_CREATE = "queue-create"; | ||
public static final String QUEUE_READ = "queue-read"; | ||
public static final String QUEUE_DELETE = "queue-delete"; | ||
public static final String QUEUE_UPDATE = "queue-update"; | ||
} |
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
19 changes: 19 additions & 0 deletions
19
...amqp-example/src/main/java/io/github/springwolf/examples/amqp/dtos/GenericPayloadDto.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,19 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
package io.github.springwolf.examples.amqp.dtos; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED; | ||
|
||
@Schema(description = "Generic payload model") | ||
@Data | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class GenericPayloadDto<T> { | ||
|
||
@Schema(description = "Generic Payload field", requiredMode = REQUIRED) | ||
private T genericValue; | ||
} |
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
Oops, something went wrong.