Skip to content

Commit

Permalink
[SDCISA-16147, swisspost#583] Revert some changes back to develop state.
Browse files Browse the repository at this point in the history
  • Loading branch information
hiddenalpha committed Jun 4, 2024
1 parent 2c5d4aa commit 326b7ee
Showing 1 changed file with 10 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,8 @@ public void setUp() {
messageValidator = Mockito.mock(KafkaMessageValidator.class);
storage = new MockResourceStorage();
configurationResourceManager = new ConfigurationResourceManager(vertx, storage, exceptionFactory);
handler = new KafkaHandler(
vertx, exceptionFactory, configurationResourceManager, null, repository,
kafkaMessageSender, configResourceUri, streamingPath, null);
handler = new KafkaHandler(configurationResourceManager, repository, kafkaMessageSender,
configResourceUri, streamingPath);

when(kafkaMessageSender.sendMessages(any(), any())).thenReturn(Future.succeededFuture());
}
Expand Down Expand Up @@ -123,9 +122,8 @@ public void initWithWildcardConfigResource(TestContext context) {
props.put("kafka.port", "9094");
storage.putMockData(configResourceUri, CONFIG_WILDCARD_RESOURCE);

handler = new KafkaHandler(
vertx, exceptionFactory, configurationResourceManager, null, repository,
kafkaMessageSender, configResourceUri, streamingPath, props);
handler = new KafkaHandler(configurationResourceManager, repository, kafkaMessageSender,
configResourceUri, streamingPath, props);
context.assertFalse(handler.isInitialized());

handler.initialize().onComplete(event -> {
Expand All @@ -150,9 +148,8 @@ public void initWithWildcardConfigResourceException(TestContext context) {
Map<String, Object> props = new HashMap<>();
storage.putMockData(configResourceUri, CONFIG_WILDCARD_RESOURCE);

handler = new KafkaHandler(
vertx, exceptionFactory, configurationResourceManager, null, repository,
kafkaMessageSender, configResourceUri, streamingPath, props);
handler = new KafkaHandler(configurationResourceManager, repository, kafkaMessageSender,
configResourceUri, streamingPath, props);
context.assertFalse(handler.isInitialized());

handler.initialize().onComplete(event -> {
Expand Down Expand Up @@ -439,9 +436,8 @@ public void handleValidPayloadWithFailingMessageSending(TestContext context){
public void handlePayloadNotPassingValidation(TestContext context){
Async async = context.async();

handler = new KafkaHandler(
vertx, exceptionFactory, configurationResourceManager, messageValidator, repository,
kafkaMessageSender, configResourceUri, streamingPath, null);
handler = new KafkaHandler(configurationResourceManager, messageValidator, repository, kafkaMessageSender,
configResourceUri, streamingPath);

when(messageValidator.validateMessages(any(HttpServerRequest.class), any()))
.thenReturn(Future.succeededFuture(new ValidationResult(ValidationStatus.VALIDATED_NEGATIV, "Boooom")));
Expand Down Expand Up @@ -489,9 +485,8 @@ public void handlePayloadNotPassingValidation(TestContext context){
public void handleErrorWhileValidation(TestContext context){
Async async = context.async();

handler = new KafkaHandler(
vertx, exceptionFactory, configurationResourceManager, messageValidator, repository,
kafkaMessageSender, configResourceUri, streamingPath, null);
handler = new KafkaHandler(configurationResourceManager, messageValidator, repository, kafkaMessageSender,
configResourceUri, streamingPath);

when(messageValidator.validateMessages(any(HttpServerRequest.class), any()))
.thenReturn(Future.failedFuture("Boooom"));
Expand Down

0 comments on commit 326b7ee

Please sign in to comment.