Skip to content

Commit 88c86b2

Browse files
committed
build: update test-only dependency - Jackson
Jackson is a transitive dependency of 'json-snapshot'. In order to use Jackson as Java Module, we update it to the latest version instead of patching it. Unfortunately, 'json-snapshot' has not been updated in years and the way we used it is not compatible with the latest Jackson version. By adjusting the test setup as described here, we make it work: json-snapshot/json-snapshot.github.io#27 (comment) Signed-off-by: Jendrik Johannes <[email protected]>
1 parent 62a6fcb commit 88c86b2

File tree

106 files changed

+181
-110
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+181
-110
lines changed

gradle/plugins/src/main/kotlin/com.hedera.gradle.patch-modules.gradle.kts

-7
Original file line numberDiff line numberDiff line change
@@ -138,13 +138,6 @@ extraJavaModuleInfo {
138138
module("com.google.api.grpc:proto-google-common-protos", "com.google.api.grpc.common")
139139

140140
// Testing only
141-
module("com.fasterxml.jackson.core:jackson-annotations", "com.fasterxml.jackson.annotations")
142-
module("com.fasterxml.jackson.core:jackson-core", "com.fasterxml.jackson.core")
143-
module("com.fasterxml.jackson.core:jackson-databind", "com.fasterxml.jackson.databind") {
144-
exportAllPackages()
145-
requireAllDefinedDependencies()
146-
requires("java.sql")
147-
}
148141
module("io.grpc:grpc-netty-shaded", "io.grpc.netty.shaded") {
149142
exportAllPackages()
150143
requireAllDefinedDependencies()

sdk-dependency-versions/build.gradle.kts

+3
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ dependencies.constraints {
7575
}
7676

7777
// Testing
78+
api("com.fasterxml.jackson.core:jackson-core:2.18.0") {
79+
because("com.fasterxml.jackson.core")
80+
}
7881
api("io.github.cdimascio:java-dotenv:5.3.1") {
7982
because("java.dotenv")
8083
}

sdk/src/test/java/com/hedera/hashgraph/sdk/AccountAllowanceApproveTransactionTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public class AccountAllowanceApproveTransactionTest {
4747

4848
@BeforeAll
4949
public static void beforeAll() {
50-
SnapshotMatcher.start();
50+
SnapshotMatcher.start(Snapshot::asJsonString);
5151
}
5252

5353
@AfterAll

sdk/src/test/java/com/hedera/hashgraph/sdk/AccountAllowanceDeleteTransactionTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public class AccountAllowanceDeleteTransactionTest {
3939

4040
@BeforeAll
4141
public static void beforeAll() {
42-
SnapshotMatcher.start();
42+
SnapshotMatcher.start(Snapshot::asJsonString);
4343
}
4444

4545
@AfterAll

sdk/src/test/java/com/hedera/hashgraph/sdk/AccountBalanceQueryTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
public class AccountBalanceQueryTest {
2929
@BeforeAll
3030
public static void beforeAll() {
31-
SnapshotMatcher.start();
31+
SnapshotMatcher.start(Snapshot::asJsonString);
3232
}
3333

3434
@AfterAll

sdk/src/test/java/com/hedera/hashgraph/sdk/AccountCreateTransactionTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public class AccountCreateTransactionTest {
4040

4141
@BeforeAll
4242
public static void beforeAll() {
43-
SnapshotMatcher.start();
43+
SnapshotMatcher.start(Snapshot::asJsonString);
4444
}
4545

4646
@AfterAll

sdk/src/test/java/com/hedera/hashgraph/sdk/AccountDeleteTransactionTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public class AccountDeleteTransactionTest {
3939

4040
@BeforeAll
4141
public static void beforeAll() {
42-
SnapshotMatcher.start();
42+
SnapshotMatcher.start(Snapshot::asJsonString);
4343
}
4444

4545
@AfterAll

sdk/src/test/java/com/hedera/hashgraph/sdk/AccountIdTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class AccountIdTest {
3939

4040
@BeforeAll
4141
public static void beforeAll() {
42-
SnapshotMatcher.start();
42+
SnapshotMatcher.start(Snapshot::asJsonString);
4343
mainnetClient = Client.forMainnet();
4444
testnetClient = Client.forTestnet();
4545
previewnetClient = Client.forPreviewnet();

sdk/src/test/java/com/hedera/hashgraph/sdk/AccountInfoQueryTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
public class AccountInfoQueryTest {
2929
@BeforeAll
3030
public static void beforeAll() {
31-
SnapshotMatcher.start();
31+
SnapshotMatcher.start(Snapshot::asJsonString);
3232
}
3333

3434
@AfterAll

sdk/src/test/java/com/hedera/hashgraph/sdk/AccountInfoTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public class AccountInfoTest {
6060

6161
@BeforeAll
6262
public static void beforeAll() {
63-
SnapshotMatcher.start();
63+
SnapshotMatcher.start(Snapshot::asJsonString);
6464
}
6565

6666
@AfterAll

sdk/src/test/java/com/hedera/hashgraph/sdk/AccountRecordsQueryTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
public class AccountRecordsQueryTest {
2929
@BeforeAll
3030
public static void beforeAll() {
31-
SnapshotMatcher.start();
31+
SnapshotMatcher.start(Snapshot::asJsonString);
3232
}
3333

3434
@AfterAll

sdk/src/test/java/com/hedera/hashgraph/sdk/AccountStakersQueryTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
public class AccountStakersQueryTest {
2929
@BeforeAll
3030
public static void beforeAll() {
31-
SnapshotMatcher.start();
31+
SnapshotMatcher.start(Snapshot::asJsonString);
3232
}
3333

3434
@AfterAll

sdk/src/test/java/com/hedera/hashgraph/sdk/AccountUpdateTransactionTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public class AccountUpdateTransactionTest {
4040

4141
@BeforeAll
4242
public static void beforeAll() {
43-
SnapshotMatcher.start();
43+
SnapshotMatcher.start(Snapshot::asJsonString);
4444
}
4545

4646
@AfterAll

sdk/src/test/java/com/hedera/hashgraph/sdk/AllowancesTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
public class AllowancesTest {
3535
@BeforeAll
3636
public static void beforeAll() {
37-
SnapshotMatcher.start();
37+
SnapshotMatcher.start(Snapshot::asJsonString);
3838
}
3939

4040
@AfterAll

sdk/src/test/java/com/hedera/hashgraph/sdk/AssessedCustomFeeTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public class AssessedCustomFeeTest {
3030

3131
@BeforeAll
3232
public static void beforeAll() {
33-
SnapshotMatcher.start();
33+
SnapshotMatcher.start(Snapshot::asJsonString);
3434
}
3535

3636
@AfterAll

sdk/src/test/java/com/hedera/hashgraph/sdk/ContractByteCodeQueryTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
public class ContractByteCodeQueryTest {
2929
@BeforeAll
3030
public static void beforeAll() {
31-
SnapshotMatcher.start();
31+
SnapshotMatcher.start(Snapshot::asJsonString);
3232
}
3333

3434
@AfterAll

sdk/src/test/java/com/hedera/hashgraph/sdk/ContractCallQueryTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public class ContractCallQueryTest {
3535

3636
@BeforeAll
3737
public static void beforeAll() {
38-
SnapshotMatcher.start();
38+
SnapshotMatcher.start(Snapshot::asJsonString);
3939
}
4040

4141
@AfterAll

sdk/src/test/java/com/hedera/hashgraph/sdk/ContractCreateTransactionTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public class ContractCreateTransactionTest {
4141

4242
@BeforeAll
4343
public static void beforeAll() {
44-
SnapshotMatcher.start();
44+
SnapshotMatcher.start(Snapshot::asJsonString);
4545
}
4646

4747
@AfterAll

sdk/src/test/java/com/hedera/hashgraph/sdk/ContractDeleteTransactionTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public class ContractDeleteTransactionTest {
3939

4040
@BeforeAll
4141
public static void beforeAll() {
42-
SnapshotMatcher.start();
42+
SnapshotMatcher.start(Snapshot::asJsonString);
4343
}
4444

4545
@AfterAll

sdk/src/test/java/com/hedera/hashgraph/sdk/ContractExecuteTransactionTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public class ContractExecuteTransactionTest {
4040

4141
@BeforeAll
4242
public static void beforeAll() {
43-
SnapshotMatcher.start();
43+
SnapshotMatcher.start(Snapshot::asJsonString);
4444
}
4545

4646
@AfterAll

sdk/src/test/java/com/hedera/hashgraph/sdk/ContractFunctionParametersTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
public class ContractFunctionParametersTest {
4545
@BeforeAll
4646
public static void beforeAll() {
47-
SnapshotMatcher.start();
47+
SnapshotMatcher.start(Snapshot::asJsonString);
4848
}
4949

5050
@AfterAll

sdk/src/test/java/com/hedera/hashgraph/sdk/ContractIdTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
class ContractIdTest {
3333
@BeforeAll
3434
public static void beforeAll() {
35-
SnapshotMatcher.start();
35+
SnapshotMatcher.start(Snapshot::asJsonString);
3636
}
3737

3838
@AfterAll

sdk/src/test/java/com/hedera/hashgraph/sdk/ContractInfoQueryTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
public class ContractInfoQueryTest {
2929
@BeforeAll
3030
public static void beforeAll() {
31-
SnapshotMatcher.start();
31+
SnapshotMatcher.start(Snapshot::asJsonString);
3232
}
3333

3434
@AfterAll

sdk/src/test/java/com/hedera/hashgraph/sdk/ContractInfoTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public class ContractInfoTest {
4747

4848
@BeforeAll
4949
public static void beforeAll() {
50-
SnapshotMatcher.start();
50+
SnapshotMatcher.start(Snapshot::asJsonString);
5151
}
5252

5353
@AfterAll

sdk/src/test/java/com/hedera/hashgraph/sdk/ContractLogInfoTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public class ContractLogInfoTest {
2121

2222
@BeforeAll
2323
public static void beforeAll() {
24-
SnapshotMatcher.start();
24+
SnapshotMatcher.start(Snapshot::asJsonString);
2525
}
2626

2727
@AfterAll

sdk/src/test/java/com/hedera/hashgraph/sdk/ContractNonceInfoTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public class ContractNonceInfoTest {
1616

1717
@BeforeAll
1818
public static void beforeAll() {
19-
SnapshotMatcher.start();
19+
SnapshotMatcher.start(Snapshot::asJsonString);
2020
}
2121

2222
@AfterAll

sdk/src/test/java/com/hedera/hashgraph/sdk/ContractUpdateTransactionTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public class ContractUpdateTransactionTest {
4040

4141
@BeforeAll
4242
public static void beforeAll() {
43-
SnapshotMatcher.start();
43+
SnapshotMatcher.start(Snapshot::asJsonString);
4444
}
4545

4646
@AfterAll

sdk/src/test/java/com/hedera/hashgraph/sdk/CryptoTransferTransactionTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public class CryptoTransferTransactionTest {
4242

4343
@BeforeAll
4444
public static void beforeAll() {
45-
SnapshotMatcher.start();
45+
SnapshotMatcher.start(Snapshot::asJsonString);
4646
}
4747

4848
@AfterAll

sdk/src/test/java/com/hedera/hashgraph/sdk/CustomFeeListTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
public class CustomFeeListTest {
3333
@BeforeAll
3434
public static void beforeAll() {
35-
SnapshotMatcher.start();
35+
SnapshotMatcher.start(Snapshot::asJsonString);
3636
}
3737

3838
@AfterAll

sdk/src/test/java/com/hedera/hashgraph/sdk/CustomFixedFeeTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public class CustomFixedFeeTest {
4040

4141
@BeforeAll
4242
public static void beforeAll() {
43-
SnapshotMatcher.start();
43+
SnapshotMatcher.start(Snapshot::asJsonString);
4444
}
4545

4646
@AfterAll

sdk/src/test/java/com/hedera/hashgraph/sdk/CustomFractionalFeeTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public class CustomFractionalFeeTest {
2727

2828
@BeforeAll
2929
public static void beforeAll() {
30-
SnapshotMatcher.start();
30+
SnapshotMatcher.start(Snapshot::asJsonString);
3131
}
3232

3333
@AfterAll

sdk/src/test/java/com/hedera/hashgraph/sdk/CustomRoyaltyFeeTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public class CustomRoyaltyFeeTest {
4343

4444
@BeforeAll
4545
public static void beforeAll() {
46-
SnapshotMatcher.start();
46+
SnapshotMatcher.start(Snapshot::asJsonString);
4747
}
4848

4949
@AfterAll

sdk/src/test/java/com/hedera/hashgraph/sdk/DelegateContractIdTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
class DelegateContractIdTest {
3030
@BeforeAll
3131
public static void beforeAll() {
32-
SnapshotMatcher.start();
32+
SnapshotMatcher.start(Snapshot::asJsonString);
3333
}
3434

3535
@AfterAll

sdk/src/test/java/com/hedera/hashgraph/sdk/EthereumTransactionTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public class EthereumTransactionTest {
1919

2020
@BeforeAll
2121
public static void beforeAll() {
22-
SnapshotMatcher.start();
22+
SnapshotMatcher.start(Snapshot::asJsonString);
2323
}
2424

2525
@AfterAll

sdk/src/test/java/com/hedera/hashgraph/sdk/FeeSchedulesTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
public class FeeSchedulesTest {
3232
@BeforeAll
3333
public static void beforeAll() {
34-
SnapshotMatcher.start();
34+
SnapshotMatcher.start(Snapshot::asJsonString);
3535
}
3636

3737
@AfterAll

sdk/src/test/java/com/hedera/hashgraph/sdk/FileAppendTransactionTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public class FileAppendTransactionTest {
9191

9292
@BeforeAll
9393
public static void beforeAll() {
94-
SnapshotMatcher.start();
94+
SnapshotMatcher.start(Snapshot::asJsonString);
9595
}
9696

9797
@AfterAll

sdk/src/test/java/com/hedera/hashgraph/sdk/FileContentsQueryTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
public class FileContentsQueryTest {
2929
@BeforeAll
3030
public static void beforeAll() {
31-
SnapshotMatcher.start();
31+
SnapshotMatcher.start(Snapshot::asJsonString);
3232
}
3333

3434
@AfterAll

sdk/src/test/java/com/hedera/hashgraph/sdk/FileCreateTransactionTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public class FileCreateTransactionTest {
3939

4040
@BeforeAll
4141
public static void beforeAll() {
42-
SnapshotMatcher.start();
42+
SnapshotMatcher.start(Snapshot::asJsonString);
4343
}
4444

4545
@AfterAll

sdk/src/test/java/com/hedera/hashgraph/sdk/FileDeleteTransactionTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public class FileDeleteTransactionTest {
3939

4040
@BeforeAll
4141
public static void beforeAll() {
42-
SnapshotMatcher.start();
42+
SnapshotMatcher.start(Snapshot::asJsonString);
4343
}
4444

4545
@AfterAll

sdk/src/test/java/com/hedera/hashgraph/sdk/FileIdTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
class FileIdTest {
3030
@BeforeAll
3131
public static void beforeAll() {
32-
SnapshotMatcher.start();
32+
SnapshotMatcher.start(Snapshot::asJsonString);
3333
}
3434

3535
@AfterAll

sdk/src/test/java/com/hedera/hashgraph/sdk/FileInfoQueryTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
public class FileInfoQueryTest {
2929
@BeforeAll
3030
public static void beforeAll() {
31-
SnapshotMatcher.start();
31+
SnapshotMatcher.start(Snapshot::asJsonString);
3232
}
3333

3434
@AfterAll

sdk/src/test/java/com/hedera/hashgraph/sdk/FileInfoTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public class FileInfoTest {
4747

4848
@BeforeAll
4949
public static void beforeAll() {
50-
SnapshotMatcher.start();
50+
SnapshotMatcher.start(Snapshot::asJsonString);
5151
}
5252

5353
@AfterAll

sdk/src/test/java/com/hedera/hashgraph/sdk/FileUpdateTransactionTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public class FileUpdateTransactionTest {
3939

4040
@BeforeAll
4141
public static void beforeAll() {
42-
SnapshotMatcher.start();
42+
SnapshotMatcher.start(Snapshot::asJsonString);
4343
}
4444

4545
@AfterAll

0 commit comments

Comments
 (0)