Skip to content

Commit

Permalink
Make integration tests more robust
Browse files Browse the repository at this point in the history
  • Loading branch information
ghillert committed May 6, 2024
1 parent 21cd896 commit fb08554
Show file tree
Hide file tree
Showing 25 changed files with 202 additions and 45 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, 2023, Oracle and/or its affiliates.
* Copyright (c) 2021, 2024, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* https://oss.oracle.com/licenses/upl.
Expand Down Expand Up @@ -40,6 +40,10 @@
@SpringBootTest(
webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
properties = {
"coherence.localhost=127.0.0.1",
"coherence.ttl=0",
"java.net.preferIPv4Stack=true",
"coherence.wka=127.0.0.1",
"management.tracing.sampling.probability=1.0",
"coherence.metrics.http.enabled=true"
}
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, 2022, Oracle and/or its affiliates.
* Copyright (c) 2021, 2024, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* https://oss.oracle.com/licenses/upl.
Expand Down Expand Up @@ -27,7 +27,14 @@
/**
* Integration tests for {@link CartRepository}.
*/
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
properties = {
"coherence.localhost=127.0.0.1",
"coherence.ttl=0",
"java.net.preferIPv4Stack=true",
"coherence.wka=127.0.0.1"
}
)
public class CartControllerIT {

protected CartRepository carts;
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Oracle and/or its affiliates.
* Copyright (c) 2021, 2024, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* https://oss.oracle.com/licenses/upl.
Expand All @@ -15,7 +15,14 @@
/**
* Integration tests for {@link CartControllerAsync}.
*/
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
properties = {
"coherence.localhost=127.0.0.1",
"coherence.ttl=0",
"java.net.preferIPv4Stack=true",
"coherence.wka=127.0.0.1"
}
)
public class CartResourceAsyncIT extends CartControllerIT {

protected String getBasePath() {
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Oracle and/or its affiliates.
* Copyright (c) 2021, 2024, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* https://oss.oracle.com/licenses/upl.
Expand All @@ -13,7 +13,14 @@
/**
* Tests for Coherence repository implementation.
*/
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
properties = {
"coherence.localhost=127.0.0.1",
"coherence.ttl=0",
"java.net.preferIPv4Stack=true",
"coherence.wka=127.0.0.1"
}
)
class CoherenceCartRepositoryAsyncIT extends CartRepositoryTest {

/**
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Oracle and/or its affiliates.
* Copyright (c) 2021, 2024, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* https://oss.oracle.com/licenses/upl.
Expand All @@ -13,7 +13,14 @@
/**
* Tests for Coherence repository implementation.
*/
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
properties = {
"coherence.localhost=127.0.0.1",
"coherence.ttl=0",
"java.net.preferIPv4Stack=true",
"coherence.wka=127.0.0.1"
}
)
class CoherenceCartRepositoryIT extends CartRepositoryTest {

/**
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, 2023, Oracle and/or its affiliates.
* Copyright (c) 2021, 2024, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* https://oss.oracle.com/licenses/upl.
Expand Down Expand Up @@ -42,7 +42,11 @@
webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
properties = {
"management.tracing.sampling.probability=1.0",
"coherence.metrics.http.enabled=true"
"coherence.metrics.http.enabled=true",
"coherence.localhost=127.0.0.1",
"coherence.ttl=0",
"java.net.preferIPv4Stack=true",
"coherence.wka=127.0.0.1"
}
)
@AutoConfigureObservability
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, 2023 Oracle and/or its affiliates.
* Copyright (c) 2021, 2024 Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* https://oss.oracle.com/licenses/upl.
Expand All @@ -22,7 +22,14 @@
/**
* Integration tests for {@link CatalogController}.
*/
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
properties = {
"coherence.localhost=127.0.0.1",
"coherence.ttl=0",
"java.net.preferIPv4Stack=true",
"coherence.wka=127.0.0.1"
}
)
public class CatalogResourceIT {

@LocalServerPort
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Oracle and/or its affiliates.
* Copyright (c) 2021, 2024, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* https://oss.oracle.com/licenses/upl.
Expand All @@ -12,7 +12,14 @@
/**
* Tests for Coherence repository implementation.
*/
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
properties = {
"coherence.localhost=127.0.0.1",
"coherence.ttl=0",
"java.net.preferIPv4Stack=true",
"coherence.wka=127.0.0.1"
}
)
class CoherenceCatalogRepositoryIT extends CatalogRepositoryTest {

@BeforeAll
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Oracle and/or its affiliates.
* Copyright (c) 2021, 2024, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* https://oss.oracle.com/licenses/upl.
Expand All @@ -21,7 +21,14 @@
/**
* Tests for Coherence repository implementation.
*/
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
properties = {
"coherence.localhost=127.0.0.1",
"coherence.ttl=0",
"java.net.preferIPv4Stack=true",
"coherence.wka=127.0.0.1"
}
)
@DirtiesContext
class CoherenceOrderRepositoryIT {
@Autowired
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Oracle and/or its affiliates.
* Copyright (c) 2021, 2024, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* https://oss.oracle.com/licenses/upl.
Expand Down Expand Up @@ -37,7 +37,14 @@
* Integration tests for {@link OrderController},
* using Coherence for persistence.
*/
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
properties = {
"coherence.localhost=127.0.0.1",
"coherence.ttl=0",
"java.net.preferIPv4Stack=true",
"coherence.wka=127.0.0.1"
}
)
@DirtiesContext
public class CoherenceOrderResourceIT {

Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, 2023, Oracle and/or its affiliates.
* Copyright (c) 2021, 2024, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* https://oss.oracle.com/licenses/upl.
Expand Down Expand Up @@ -45,6 +45,10 @@
"management.tracing.sampling.probability=1.0",
"coherence.metrics.http.enabled=true",
"management.endpoints.web.exposure.include=*",
"coherence.localhost=127.0.0.1",
"coherence.ttl=0",
"java.net.preferIPv4Stack=true",
"coherence.wka=127.0.0.1"
}
)
@AutoConfigureObservability
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, 2023, Oracle and/or its affiliates.
* Copyright (c) 2021, 2024, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* https://oss.oracle.com/licenses/upl.
Expand Down Expand Up @@ -40,6 +40,10 @@
@SpringBootTest(
webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
properties = {
"coherence.localhost=127.0.0.1",
"coherence.ttl=0",
"java.net.preferIPv4Stack=true",
"coherence.wka=127.0.0.1",
"management.tracing.sampling.probability=1.0",
"coherence.metrics.http.enabled=true"
}
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Oracle and/or its affiliates.
* Copyright (c) 2021, 2024, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* https://oss.oracle.com/licenses/upl.
Expand All @@ -12,6 +12,13 @@
* Integration tests for {@link PaymentController},
* using Coherence for persistence.
*/
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
properties = {
"coherence.localhost=127.0.0.1",
"coherence.ttl=0",
"java.net.preferIPv4Stack=true",
"coherence.wka=127.0.0.1"
}
)
public class CoherencePaymentResourceIT extends PaymentResourceIT {
}
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, 2023 Oracle and/or its affiliates.
* Copyright (c) 2021, 2024, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* https://oss.oracle.com/licenses/upl.
Expand Down Expand Up @@ -31,7 +31,14 @@
/**
* Integration tests for {@link PaymentController}.
*/
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
properties = {
"coherence.localhost=127.0.0.1",
"coherence.ttl=0",
"java.net.preferIPv4Stack=true",
"coherence.wka=127.0.0.1"
}
)
public class PaymentResourceIT {

@LocalServerPort
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Oracle and/or its affiliates.
* Copyright (c) 2021, 2024, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* https://oss.oracle.com/licenses/upl.
Expand All @@ -13,7 +13,14 @@
/**
* Tests for Coherence repository implementation.
*/
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
properties = {
"coherence.localhost=127.0.0.1",
"coherence.ttl=0",
"java.net.preferIPv4Stack=true",
"coherence.wka=127.0.0.1"
}
)
class CoherencePaymentRepositoryIT extends PaymentRepositoryTest {
@Autowired
TestPaymentRepository testPaymentRepository;
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Oracle and/or its affiliates.
* Copyright (c) 2021, 2024, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* https://oss.oracle.com/licenses/upl.
Expand All @@ -13,7 +13,14 @@
/**
* Tests for Coherence repository implementation.
*/
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
properties = {
"coherence.localhost=127.0.0.1",
"coherence.ttl=0",
"java.net.preferIPv4Stack=true",
"coherence.wka=127.0.0.1"
}
)
class CoherenceShipmentRepositoryIT extends ShipmentRepositoryTest {
@Autowired
TestShipmentRepository shipmentRepository;
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, Oracle and/or its affiliates.
* Copyright (c) 2021, 2024, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* https://oss.oracle.com/licenses/upl.
Expand Down Expand Up @@ -41,6 +41,10 @@
@SpringBootTest(
webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
properties = {
"coherence.localhost=127.0.0.1",
"coherence.ttl=0",
"java.net.preferIPv4Stack=true",
"coherence.wka=127.0.0.1",
"management.tracing.sampling.probability=1.0",
"coherence.metrics.http.enabled=true"
}
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, 2023 Oracle and/or its affiliates.
* Copyright (c) 2021, 2024, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* https://oss.oracle.com/licenses/upl.
Expand Down Expand Up @@ -29,7 +29,14 @@
/**
* Integration tests for {@link ShippingController}.
*/
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
properties = {
"coherence.localhost=127.0.0.1",
"coherence.ttl=0",
"java.net.preferIPv4Stack=true",
"coherence.wka=127.0.0.1"
}
)
public class ShippingResourceIT {

@LocalServerPort
Expand Down

0 comments on commit fb08554

Please sign in to comment.