Skip to content

Commit

Permalink
[MODAUD-183] - Upgrade rmb and vertex version. (#164)
Browse files Browse the repository at this point in the history
* [MODAUD-183] - Upgrade rmb and vertex version.

* [MODAUD-183] - Upgrade rmb and vertex version.

* [MODAUD-183] - Upgrade rmb and vertex version.

* MODAUD-183 - fixing the failed test cases.

* MODAUD-183 - fixing the failed test cases.

* MODAUD-183 - fixing the failed test cases.

* MODAUD-183 - fixing the failed test cases.
  • Loading branch information
gurleenkaurbp authored Mar 12, 2024
1 parent 1d7cf41 commit 0459d3f
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 36 deletions.
18 changes: 9 additions & 9 deletions mod-audit-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-clients</artifactId>
<version>3.1.0</version>
<version>3.6.1</version>
</dependency>
<dependency>
<groupId>io.vertx</groupId>
Expand All @@ -55,7 +55,7 @@
<dependency>
<groupId>net.mguenther.kafka</groupId>
<artifactId>kafka-junit</artifactId>
<version>3.1.0</version>
<version>3.6.0</version>
<scope>test</scope>
<exclusions>
<exclusion>
Expand Down Expand Up @@ -153,7 +153,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.12.1</version>
<configuration>
<release>17</release>
<encoding>UTF-8</encoding>
Expand All @@ -163,7 +163,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.2.0</version>
<version>3.5.0</version>
<executions>
<execution>
<id>add_generated_sources_folder</id>
Expand Down Expand Up @@ -221,7 +221,7 @@
<plugin>
<groupId>dev.aspectj</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>1.13.1</version>
<version>1.14</version>
<configuration>
<verbose>true</verbose>
<showWeaveInfo>false</showWeaveInfo>
Expand Down Expand Up @@ -266,7 +266,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
<version>3.3.1</version>
<executions>
<execution>
<id>copy-resources</id>
Expand Down Expand Up @@ -310,7 +310,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>3.0.0</version>
<version>3.1.0</version>
<executions>
<execution>
<phase>prepare-package</phase>
Expand All @@ -334,7 +334,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.2</version>
<version>3.5.2</version>
<executions>
<execution>
<phase>package</phase>
Expand Down Expand Up @@ -377,7 +377,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
<version>3.0.1</version>
<configuration>
<preparationGoals>clean verify</preparationGoals>
<tagNameFormat>v@{project.version}</tagNameFormat>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class AuditHandlersService extends BaseService implements AuditHandlers {
@Override
@Validate
public void postAuditHandlersLogRecord(String entity, Map<String, String> okapiHeaders,
Handler<AsyncResult<Response>> asyncResultHandler, Context vertxContext) {
Handler<AsyncResult<Response>> asyncResultHandler, Context vertxContext) {
LOGGER.debug("postAuditHandlersLogRecord:: Trying to Save AuditHandlersLogRecord request with entity: {}", entity);
try {
LOGGER.info("postAuditHandlersLogRecord:: Saving AuditHandlersLogRecord request with entity: {}", entity);
Expand All @@ -52,6 +52,7 @@ public void postAuditHandlersLogRecord(String entity, Map<String, String> okapiH
}
}


private CompletableFuture<List<LogRecord>> processAnonymize(List<LogRecord> records,
Map<String, String> okapiHeaders, Context vertxContext) {
LOGGER.debug("processAnonymize:: Processing anonymize for records");
Expand All @@ -78,10 +79,10 @@ private CompletableFuture<List<LogRecord>> anonymizeLoanRelatedRecords(List<LogR
.get(LOGS_TABLE_NAME, LogRecord.class, new String[] { "*" }, cqlWrapper, false, false, reply -> {
if (reply.succeeded()) {
LOGGER.info("anonymizeLoanRelatedRecords:: Anonymize loan-related records for log records Successfully");
reply.result().getResults().forEach(record -> {
record.setUserBarcode(null);
record.setLinkToIds(record.getLinkToIds().withUserId(null));
result.add(record);
reply.result().getResults().forEach(logRecord -> {
logRecord.setUserBarcode(null);
logRecord.setLinkToIds(logRecord.getLinkToIds().withUserId(null));
result.add(logRecord);
});
future.complete(result);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,24 +101,24 @@ void shouldReturnOrderLineEventsOnGetByOrderLineId() {
.withActionDate(new Date())
.withOrderLineSnapshot(jsonObject);

orderLineEventDao.save(orderLineAuditEvent, TENANT_ID);
orderLineEventDao.save(orderLineAuditEvent, TENANT_ID).onComplete(v -> {
given().header(CONTENT_TYPE).header(TENANT).header(PERMS).get(ACQ_AUDIT_ORDER_LINE_PATH + INVALID_ID)
.then().log().all().statusCode(200)
.body(containsString("orderLineAuditEvents")).body(containsString("totalItems"));

given().header(CONTENT_TYPE).header(TENANT).header(PERMS).get(ACQ_AUDIT_ORDER_LINE_PATH + INVALID_ID)
.then().log().all().statusCode(200)
.body(containsString("orderLineAuditEvents")).body(containsString("totalItems"));

given().header(CONTENT_TYPE).header(TENANT).header(PERMS).get(ACQ_AUDIT_ORDER_LINE_PATH + ORDER_LINE_ID)
.then().log().all().statusCode(200)
.body(containsString(ORDER_LINE_ID));
given().header(CONTENT_TYPE).header(TENANT).header(PERMS).get(ACQ_AUDIT_ORDER_LINE_PATH + ORDER_LINE_ID)
.then().log().all().statusCode(200)
.body(containsString(ORDER_LINE_ID));

given().header(CONTENT_TYPE).header(TENANT).header(PERMS).get(ACQ_AUDIT_ORDER_LINE_PATH + ORDER_LINE_ID + "?limit=1").then().log().all().statusCode(200)
.body(containsString(ORDER_LINE_ID));
given().header(CONTENT_TYPE).header(TENANT).header(PERMS).get(ACQ_AUDIT_ORDER_LINE_PATH + ORDER_LINE_ID + "?limit=1").then().log().all().statusCode(200)
.body(containsString(ORDER_LINE_ID));

given().header(CONTENT_TYPE).header(TENANT).header(PERMS).get(ACQ_AUDIT_ORDER_LINE_PATH + ORDER_LINE_ID + "?sortBy=action_date").then().log().all().statusCode(200)
.body(containsString(ORDER_LINE_ID));
given().header(CONTENT_TYPE).header(TENANT).header(PERMS).get(ACQ_AUDIT_ORDER_LINE_PATH + ORDER_LINE_ID + "?sortBy=action_date").then().log().all().statusCode(200)
.body(containsString(ORDER_LINE_ID));

given().header(CONTENT_TYPE).header(TENANT).header(PERMS).get(ACQ_AUDIT_ORDER_PATH + ORDER_LINE_ID + 123).then().log().all().statusCode(500)
.body(containsString("UUID string too large"));
given().header(CONTENT_TYPE).header(TENANT).header(PERMS).get(ACQ_AUDIT_ORDER_PATH + ORDER_LINE_ID + 123).then().log().all().statusCode(500)
.body(containsString("UUID string too large"));
});
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ void anonymizeLoanShouldRemoveUserDataFromRelatedRecords() {
.log().all()
.statusCode(204);

await().atLeast(1, TimeUnit.SECONDS);
await().pollDelay(1, TimeUnit.SECONDS).until(() -> true);

given().headers(HEADERS).get(CIRCULATION_LOGS_ENDPOINT + "?query=(items=845687423)")
.then().log().all().statusCode(200)
Expand Down
14 changes: 7 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
</modules>

<properties>
<aspectj.version>1.9.19</aspectj.version>
<raml-module-builder.version>35.0.4</raml-module-builder.version>
<vertx.version>4.3.5</vertx.version>
<aspectj.version>1.9.21.1</aspectj.version>
<raml-module-builder.version>35.2.0</raml-module-builder.version>
<vertx.version>4.5.4</vertx.version>
<wiremock.version>2.25.1</wiremock.version>
<junit.jupiter.version>5.6.2</junit.jupiter.version>
<rest-assured.version>4.3.0</rest-assured.version>
<rest-assured.version>5.4.0</rest-assured.version>
<jackson.version>2.14.1</jackson.version>
<pubsub.client.version>2.7.0</pubsub.client.version>
<streamx.version>0.7.3</streamx.version>
Expand Down Expand Up @@ -65,7 +65,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.12.1</version>
<configuration>
<release>17</release>
<encoding>UTF-8</encoding>
Expand All @@ -89,7 +89,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
<version>3.3.1</version>
<executions>
<execution>
<id>filter-descriptor-inputs</id>
Expand Down Expand Up @@ -141,7 +141,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
<version>3.0.1</version>
<configuration>
<preparationGoals>clean verify</preparationGoals>
<tagNameFormat>v@{project.version}</tagNameFormat>
Expand Down

0 comments on commit 0459d3f

Please sign in to comment.