Skip to content
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
2 changes: 1 addition & 1 deletion listing-command/listing-command-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>listing-command</artifactId>
<groupId>uk.gov.moj.cpp.listing</groupId>
<version>17.103.177-SNAPSHOT</version>
<version>17.104.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion listing-command/listing-command-handler/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>listing-command</artifactId>
<groupId>uk.gov.moj.cpp.listing</groupId>
<version>17.103.177-SNAPSHOT</version>
<version>17.104.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion listing-command/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>listing-parent</artifactId>
<groupId>uk.gov.moj.cpp.listing</groupId>
<version>17.103.177-SNAPSHOT</version>
<version>17.104.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion listing-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>listing-parent</artifactId>
<groupId>uk.gov.moj.cpp.listing</groupId>
<version>17.103.177-SNAPSHOT</version>
<version>17.104.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion listing-domain/listing-domain-aggregate/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>listing-domain</artifactId>
<groupId>uk.gov.moj.cpp.listing</groupId>
<version>17.103.177-SNAPSHOT</version>
<version>17.104.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion listing-domain/listing-domain-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>listing-domain</artifactId>
<groupId>uk.gov.moj.cpp.listing</groupId>
<version>17.103.177-SNAPSHOT</version>
<version>17.104.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion listing-domain/listing-domain-event/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>listing-domain</artifactId>
<groupId>uk.gov.moj.cpp.listing</groupId>
<version>17.103.177-SNAPSHOT</version>
<version>17.104.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion listing-domain/listing-domain-xhibit/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>listing-domain</artifactId>
<groupId>uk.gov.moj.cpp.listing</groupId>
<version>17.103.177-SNAPSHOT</version>
<version>17.104.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion listing-domain/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>uk.gov.moj.cpp.listing</groupId>
<artifactId>listing-parent</artifactId>
<version>17.103.177-SNAPSHOT</version>
<version>17.104.3-SNAPSHOT</version>
</parent>

<artifactId>listing-domain</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion listing-event-sources/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>listing-parent</artifactId>
<groupId>uk.gov.moj.cpp.listing</groupId>
<version>17.103.177-SNAPSHOT</version>
<version>17.104.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion listing-event/listing-event-listener/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>listing-event</artifactId>
<groupId>uk.gov.moj.cpp.listing</groupId>
<version>17.103.177-SNAPSHOT</version>
<version>17.104.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion listing-event/listing-event-processor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>listing-event</artifactId>
<groupId>uk.gov.moj.cpp.listing</groupId>
<version>17.103.177-SNAPSHOT</version>
<version>17.104.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion listing-event/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>uk.gov.moj.cpp.listing</groupId>
<artifactId>listing-parent</artifactId>
<version>17.103.177-SNAPSHOT</version>
<version>17.104.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion listing-healthchecks/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>listing-parent</artifactId>
<groupId>uk.gov.moj.cpp.listing</groupId>
<version>17.103.177-SNAPSHOT</version>
<version>17.104.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion listing-integration-test-persistence/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>listing-parent</artifactId>
<groupId>uk.gov.moj.cpp.listing</groupId>
<version>17.103.177-SNAPSHOT</version>
<version>17.104.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
60 changes: 1 addition & 59 deletions listing-integration-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,14 @@
<parent>
<artifactId>listing-parent</artifactId>
<groupId>uk.gov.moj.cpp.listing</groupId>
<version>17.103.177-SNAPSHOT</version>
<version>17.104.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>listing-integration-test</artifactId>

<properties>
<jboss-logging.version>3.3.1.Final</jboss-logging.version>
<!--
Optional frozen-clock override for ItClock. Empty by default (live system UTC clock);
set -Dit.clock=2026-06-15T00:30:00+01:00[Europe/London] to simulate the 00:00-01:00 BST
band without waiting for real midnight (see run-it-midnight.sh). Declared here so the
failsafe systemPropertyVariables interpolation below resolves to "" when unset rather than
leaking the literal ${it.clock}.
-->
<it.clock />
</properties>

<dependencies>
Expand Down Expand Up @@ -202,48 +194,6 @@
<skip>true</skip>
</configuration>
</plugin>
<!--
Guard rail (Phase 4): fail the build if any IT source reads the wall clock
directly instead of going through ItClock. Only the NO-ARG now() overloads and
new Date() are banned; ItClock itself uses the Clock-argument overloads
(LocalDate.now(CLOCK), ZonedDateTime.now(CLOCK)) so it is not flagged. The two
timing/logging infra classes are excluded — their Instant.now() measures elapsed
time, not a calendar date. Runs in the default build (mvn install); the
command-line -P listing-integration-test profile deactivates this activeByDefault
profile, so the guard adds zero overhead to the IT run itself.
-->
<plugin>
<groupId>de.thetaphi</groupId>
<artifactId>forbiddenapis</artifactId>
<version>3.7</version>
<configuration>
<failOnUnresolvableSignatures>false</failOnUnresolvableSignatures>
<signatures>
java.time.LocalDate#now() @ Use ItClock.today() — the single anchored test clock
java.time.LocalDateTime#now() @ Use ItClock.nowLocalDateTime()
java.time.LocalTime#now() @ Derive from ItClock
java.time.ZonedDateTime#now() @ Use ItClock.nowUtc() / ItClock.nowLondon()
java.time.OffsetDateTime#now() @ Derive from ItClock
java.time.Instant#now() @ Use ItClock.nowInstant() for data dates (elapsed-time infra is excluded)
java.time.Year#now() @ Derive from ItClock
java.util.Date#&lt;init&gt;() @ Use ItClock — new Date() reads the host clock/zone
</signatures>
<excludes>
<exclude>**/it/util/ItClock.class</exclude>
<exclude>**/TestDurationListener.class</exclude>
<exclude>**/ServerLogTestMarkerExtension.class</exclude>
</excludes>
</configuration>
<executions>
<execution>
<id>ban-direct-wall-clock-reads</id>
<phase>process-test-classes</phase>
<goals>
<goal>testCheck</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
Expand Down Expand Up @@ -279,14 +229,6 @@
</execution>
</executions>
<configuration>
<!--
Forward the optional frozen-clock anchor into the forked IT JVM so
ItClock.resolveClock() can read it. Empty when -Dit.clock is not given,
which ItClock treats as "live system UTC clock" (see run-it-midnight.sh).
-->
<systemPropertyVariables>
<it.clock>${it.clock}</it.clock>
</systemPropertyVariables>
<includes>
<include>**/*IT.java</include>
</includes>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ void setUp() {
setupProgressionNotesStubs();
setupUsersGroupPermissionsForApplicationTypeStub();
databaseCleaner.cleanEventStoreTables(CONTEXT_NAME);
databaseCleaner.cleanViewStoreTables(CONTEXT_NAME, "stream_status",
databaseCleaner.cleanViewStoreTables(CONTEXT_NAME, "stream_status","processed_event",
"stream_buffer", "hearing", "hearing_days", "listing_notes", "cache_refdata_courtroom", "court_list_publish_status", "published_court_list");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
@SuppressWarnings({"squid:S1607"})
public class RangeSearchQueryForCourtCalendarIT extends AbstractIT {

private static final String CONTEXT_NAME = "listing";
private static final Map<UUID, String> COURT_ROOMS = new LinkedHashMap<>() {{
put(fromString("1d0199f8-8812-48a2-b13c-837e1c03ff19"), "Courtroom 01");
put(fromString("18982e9c-2475-36a4-a852-09ab720acfc9"), "Courtroom 03");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import static org.hamcrest.CoreMatchers.hasItem;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.hasSize;
import static org.hamcrest.core.IsEqual.equalTo;
import static org.hamcrest.Matchers.is;
import static uk.gov.moj.cpp.listing.helper.SearchHearingHelper.getHearingFilter;
import static uk.gov.moj.cpp.listing.helper.SearchHearingHelper.pollForHearing;
import static uk.gov.moj.cpp.listing.steps.UpdateHearingSteps.DEFAULT_DURATION_HOURS_MINS;
Expand Down Expand Up @@ -46,10 +46,17 @@ public void whenHearingIsUpdatedForListingForWeekCommencingDate() {

request = prepareJsonForUpdatedHearingData(updatedHearingData);

final Response response = restClient.postCommand(updateHearingUrl, MEDIA_TYPE_UPDATE_HEARING_FOR_LISTING,
request, getLoggedInHeader());

assertThat(response.getStatus(), equalTo(SC_ACCEPTED));
try (Response response = restClient.postCommand(updateHearingUrl, MEDIA_TYPE_UPDATE_HEARING_FOR_LISTING, request, getLoggedInHeader())) {

String responseBody = "";
try {
responseBody = response.readEntity(String.class);
} catch (IllegalStateException e) {
//no-op in case of no response
}
assertThat(format("Post returned not expected status code with body: %s", responseBody),
response.getStatus(), is(SC_ACCEPTED));
}
}

public void verifyHearingUpdatedWithWeekCommencingDateAndUnallocatedWhenQueryingFromAPI() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package uk.gov.moj.cpp.listing.utils;

import static java.nio.charset.Charset.defaultCharset;
import static javax.json.Json.createReader;
import static uk.gov.justice.services.messaging.JsonObjects.createReader;
import static org.apache.commons.io.FileUtils.readFileToString;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.IsNull.notNullValue;
Expand Down
2 changes: 1 addition & 1 deletion listing-json/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>listing-parent</artifactId>
<groupId>uk.gov.moj.cpp.listing</groupId>
<version>17.103.177-SNAPSHOT</version>
<version>17.104.3-SNAPSHOT</version>
</parent>

<artifactId>listing-json</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion listing-performance-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>uk.gov.moj.cpp.listing</groupId>
<artifactId>listing-parent</artifactId>
<version>17.103.177-SNAPSHOT</version>
<version>17.104.3-SNAPSHOT</version>
</parent>

<artifactId>listing-performance-test</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion listing-query/listing-query-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>uk.gov.moj.cpp.listing</groupId>
<artifactId>listing-query</artifactId>
<version>17.103.177-SNAPSHOT</version>
<version>17.104.3-SNAPSHOT</version>
</parent>

<artifactId>listing-query-api</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
import javax.inject.Inject;
import uk.gov.justice.services.messaging.JsonObjects;

import javax.json.Json;
import javax.json.JsonArray;
import javax.json.JsonArrayBuilder;
import javax.json.JsonObject;
Expand Down Expand Up @@ -373,7 +372,7 @@ private JsonArrayBuilder buildApplicationsWithEnrichedPayload(final JsonEnvelope

if (appDetails.isPresent()) {
final CourtApplication courtApplicationObj = jsonObjectToObjectConverter.convert(appDetails.get().getJsonObject("courtApplication"), CourtApplication.class);
final JsonObjectBuilder appBuilder = Json.createObjectBuilder();
final JsonObjectBuilder appBuilder = JsonObjects.createObjectBuilder();
application.forEach(appBuilder::add);
appBuilder.add("applicationTypeCode", courtApplicationObj.getType().getCode());
applicationsBuilder.add(appBuilder.build());
Expand All @@ -389,7 +388,7 @@ private JsonArrayBuilder buildApplicationsWithEnrichedPayload(final JsonEnvelope
}

private static JsonObject buildHearingPayloadWithUpdatedApplications(final JsonObject hearing, final JsonArrayBuilder applicationsBuilder) {
final JsonObjectBuilder hearingBuilder = Json.createObjectBuilder();
final JsonObjectBuilder hearingBuilder = JsonObjects.createObjectBuilder();
hearing.forEach((key, value) -> {
if (!COURT_APPLICATIONS.equals(key)) {
hearingBuilder.add(key, value);
Expand All @@ -400,7 +399,7 @@ private static JsonObject buildHearingPayloadWithUpdatedApplications(final JsonO
}

private static @NonNull JsonObjectBuilder buildResponsePayloadWithUpdatedHearing(final JsonObject payload, final JsonArrayBuilder hearingsBuilder) {
final JsonObjectBuilder payloadBuilder = Json.createObjectBuilder();
final JsonObjectBuilder payloadBuilder = JsonObjects.createObjectBuilder();
payload.forEach((key, value) -> {
if (!HEARINGS.equals(key)) {
payloadBuilder.add(key, value);
Expand Down
2 changes: 1 addition & 1 deletion listing-query/listing-query-view/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>uk.gov.moj.cpp.listing</groupId>
<artifactId>listing-query</artifactId>
<version>17.103.177-SNAPSHOT</version>
<version>17.104.3-SNAPSHOT</version>
</parent>

<artifactId>listing-query-view</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package uk.gov.moj.cpp.listing.query.view.service;

import static java.util.UUID.randomUUID;
import static javax.json.Json.createObjectBuilder;
import static uk.gov.justice.services.messaging.JsonObjects.createObjectBuilder;
import static org.codehaus.groovy.runtime.InvokerHelper.asList;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.hasSize;
Expand Down
2 changes: 1 addition & 1 deletion listing-query/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>uk.gov.moj.cpp.listing</groupId>
<artifactId>listing-parent</artifactId>
<version>17.103.177-SNAPSHOT</version>
<version>17.104.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion listing-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>uk.gov.moj.cpp.listing</groupId>
<artifactId>listing-parent</artifactId>
<version>17.103.177-SNAPSHOT</version>
<version>17.104.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion listing-viewstore/listing-viewstore-liquibase/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>listing-viewstore</artifactId>
<groupId>uk.gov.moj.cpp.listing</groupId>
<version>17.103.177-SNAPSHOT</version>
<version>17.104.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion listing-viewstore/listing-viewstore-persistence/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>uk.gov.moj.cpp.listing</groupId>
<artifactId>listing-viewstore</artifactId>
<version>17.103.177-SNAPSHOT</version>
<version>17.104.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Loading
Loading