Skip to content

Commit

Permalink
Maven surefire not running and failing test and warnings (#294)
Browse files Browse the repository at this point in the history
* Maven surefire wasn't running and failing test and warnings
* Fix src/test/java/uk/gov/ons/ctp/response/casesvc/state/StateTransitionManagerUnitTest.java
* auto patch increment

---------

Co-authored-by: ras-rm-pr-bot <[email protected]>
  • Loading branch information
pricem14pc and ras-rm-pr-bot authored Oct 17, 2024
1 parent 4c8823b commit 725e571
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 15 deletions.
4 changes: 2 additions & 2 deletions _infra/helm/case/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 12.0.23
version: 12.0.24

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: 12.0.23
appVersion: 12.0.24
8 changes: 8 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@
<plugin>
<artifactId>exec-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<version>3.4.1</version>
<executions>
<execution>
<id>pre-stop</id>
Expand Down Expand Up @@ -382,6 +383,13 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire.version}</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>3.2.5</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
package uk.gov.ons.ctp.response.casesvc.message.sampleunitnotification;

import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.*;
import lombok.experimental.SuperBuilder;

@Data
@EqualsAndHashCode(callSuper = true)
@AllArgsConstructor
@NoArgsConstructor(access = AccessLevel.PUBLIC)
@SuperBuilder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
@AllArgsConstructor
@NoArgsConstructor
public class RestUtilityConfig {
private String scheme = "http";
private String host = "localhost";
private String port = "8080";
@Builder.Default private String scheme = "http";
@Builder.Default private String host = "localhost";
@Builder.Default private String port = "8080";
private String username;
private String password;
}
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ public void testCreateCaseAndCaseGroupWithoutChildFromMessage() throws Exception
Case capturedCase = caze.getValue();

assertEquals(UUID.class, capturedCase.getId().getClass());
assertEquals(new Integer(capturedCaseGroup.getCaseGroupPK()), capturedCase.getCaseGroupFK());
assertEquals(
Integer.valueOf(capturedCaseGroup.getCaseGroupPK()), capturedCase.getCaseGroupFK());
assertEquals(capturedCaseGroup.getId(), capturedCase.getCaseGroupId());
assertEquals(CaseState.ACTIONABLE, capturedCase.getState());
assertEquals(
Expand Down Expand Up @@ -170,7 +171,7 @@ public void testCreateCaseAndCaseGroupWithChildFromMessage() throws Exception {

Case childCase = capturedCases.get(0);
assertEquals(UUID.class, childCase.getId().getClass());
assertEquals(new Integer(capturedCaseGroup.getCaseGroupPK()), childCase.getCaseGroupFK());
assertEquals(Integer.valueOf(capturedCaseGroup.getCaseGroupPK()), childCase.getCaseGroupFK());
assertEquals(capturedCaseGroup.getId(), childCase.getCaseGroupId());
assertEquals(CaseState.ACTIONABLE, childCase.getState());
assertEquals(
Expand All @@ -184,7 +185,7 @@ public void testCreateCaseAndCaseGroupWithChildFromMessage() throws Exception {

Case parentCase = capturedCases.get(2);
assertEquals(UUID.class, parentCase.getId().getClass());
assertEquals(new Integer(capturedCaseGroup.getCaseGroupPK()), parentCase.getCaseGroupFK());
assertEquals(Integer.valueOf(capturedCaseGroup.getCaseGroupPK()), parentCase.getCaseGroupFK());
assertEquals(capturedCaseGroup.getId(), parentCase.getCaseGroupId());
assertEquals(CaseState.INACTIONABLE, parentCase.getState());
assertEquals(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -584,14 +584,14 @@ public void givenUnknownEligibilityWhenEqLaunchThenComplete() throws CTPExceptio
@Test
public void testCaseGroupTransitionFromCompleteToNotStarted() throws CTPException {
// Given
CaseGroupStatus notStarted = CaseGroupStatus.NOTSTARTED;
CaseGroupStatus caseGroupStatus = CaseGroupStatus.COMPLETE;

// When
CaseGroupStatus destinationState =
caseGroupStateMachine.transition(
notStarted, CategoryDTO.CategoryName.OFFLINE_RESPONSE_PROCESSED);
caseGroupStatus, CategoryDTO.CategoryName.COMPLETED_TO_NOTSTARTED);

// Then
assertEquals(CaseGroupStatus.COMPLETE, destinationState);
assertEquals(CaseGroupStatus.NOTSTARTED, destinationState);
}
}

0 comments on commit 725e571

Please sign in to comment.