Skip to content
This repository was archived by the owner on Sep 9, 2024. It is now read-only.

Commit 1d4f78d

Browse files
committed
chore: Upgrade contract-case core dependencies
1 parent 1aca87f commit 1d4f78d

5 files changed

Lines changed: 18 additions & 9 deletions

File tree

build.gradle

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,14 @@ repositories {
1313
mavenLocal()
1414
}
1515

16-
def caseCoreVersion = "0.15.2"
16+
def caseCoreVersion = "0.15.4"
17+
def caseBoundaryVersion = "0.10.2"
1718
def grpcVersion = "1.60.1"
1819

1920
dependencies {
2021
api "io.contract-testing.contractcase:case_example_mock_types:${caseCoreVersion}"
2122
api "io.contract-testing.contractcase:test-equivalence-matchers:${caseCoreVersion}"
22-
implementation 'io.contract-testing.contractcase:case_boundary:0.6.3'
23+
implementation "io.contract-testing.contractcase:case_boundary:${caseBoundaryVersion}"
2324
implementation 'com.diogonunes:JColor:5.5.1'
2425
implementation 'com.google.protobuf:protobuf-java:3.25.1'
2526
implementation 'com.google.protobuf:protobuf-java-util:3.25.1'

src/main/java/io/contract_testing/contractcase/BoundaryStateHandlerMapper.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import io.contract_testing.contractcase.case_boundary.BoundaryResult;
44
import io.contract_testing.contractcase.case_boundary.BoundaryStateHandler;
5-
import io.contract_testing.contractcase.case_boundary.BoundaryStateHandlerWithTeardown;
65
import io.contract_testing.contractcase.case_boundary.BoundarySuccess;
76
import io.contract_testing.contractcase.case_boundary.BoundarySuccessWithMap;
87
import java.util.HashMap;
@@ -11,7 +10,7 @@
1110

1211
class BoundaryStateHandlerMapper {
1312

14-
public static Map<String, ? extends BoundaryStateHandler> map(
13+
public static Map<String, BoundaryStateHandler> map(
1514
Map<String, StateHandler> stateHandlers) {
1615
var ret = new HashMap<String, BoundaryStateHandler>();
1716

@@ -20,9 +19,9 @@ class BoundaryStateHandlerMapper {
2019
return ret;
2120
}
2221

23-
private static BoundaryStateHandlerWithTeardown map(StateHandler handler) {
22+
private static BoundaryStateHandler map(StateHandler handler) {
2423

25-
return new BoundaryStateHandlerWithTeardown() {
24+
return new BoundaryStateHandler() {
2625

2726
@Override
2827
public @NotNull BoundaryResult setup() {

src/main/java/io/contract_testing/contractcase/ContractDefiner.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package io.contract_testing.contractcase;
22

3-
import io.contract_testing.contractcase.case_example_mock_types.base.AnyMockDescriptor;
3+
import io.contract_testing.contractcase.case_example_mock_types.mocks.base.AnyMockDescriptor;
44
import io.contract_testing.contractcase.client.InternalDefinerClient;
55
import org.jetbrains.annotations.NotNull;
66

src/main/java/io/contract_testing/contractcase/ExampleDefinition.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import com.fasterxml.jackson.databind.JsonNode;
55
import com.fasterxml.jackson.databind.ObjectMapper;
66
import com.fasterxml.jackson.databind.node.ObjectNode;
7-
import io.contract_testing.contractcase.case_example_mock_types.base.AnyMockDescriptor;
7+
import io.contract_testing.contractcase.case_example_mock_types.mocks.base.AnyMockDescriptor;
88
import java.util.List;
99
import java.util.function.Function;
1010

src/main/java/io/contract_testing/contractcase/client/InternalDefinerClient.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,16 @@ public void onNext(DefinitionResponse note) {
312312
@Override
313313
public void onError(Throwable t) {
314314
Status status = Status.fromThrowable(t);
315-
System.err.println("ContractCase failed: " + status);
315+
if (Status.Code.UNAVAILABLE.equals(status.getCode())) {
316+
System.err.println(
317+
"ContractCase was unable to contact its internal server."
318+
+ " This is either a conflict while starting the server,"
319+
+ " or a bug in ContractCase. Please see the rest of the "
320+
+ "log output. If it is a bug, please open an issue on "
321+
+ "https://github.com/case-contract-testing/contract-case");
322+
} else {
323+
System.err.println("ContractCase failed: " + status);
324+
}
316325
errorStatus = status;
317326
}
318327

0 commit comments

Comments
 (0)