Skip to content

Commit

Permalink
[issue 190] - Fix InfinispanOperatorProvisionerTest in order not to u…
Browse files Browse the repository at this point in the history
…se .spec.service.type=cache
  • Loading branch information
fabiobrz committed Aug 30, 2024
1 parent e927347 commit 4f419ea
Showing 1 changed file with 4 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,30 +166,6 @@ public void testMinimalTwoReplicasInfinispan() {
}
}

/**
* This test case creates and validates a basic {@link Infinispan} CR, configured for using Cache service type
* explicitly
*
* This is not an integration test, the goal here is to assess that the created CRs are configured as per the
* model specification.
*/
@Test
public void testMinimalTwoReplicasCacheServiceInfinispan() {
INFINISPAN_OPERATOR_PROVISIONER.subscribe();
try {
name = "example-infinispan";
Infinispan infinispan = new InfinispanBuilder(name, matchLabels)
.replicas(2)
.service(new InfinispanServiceSpecBuilder().type(Service.Type.Cache)
.build())
.build();

verifyMinimalTwoReplicasInfinispan(infinispan, true);
} finally {
INFINISPAN_OPERATOR_PROVISIONER.unsubscribe();
}
}

/**
* This test case creates and validates a basic {@link Infinispan} CR, configured for using Cache service type
* and autoscale functionality
Expand All @@ -198,14 +174,14 @@ public void testMinimalTwoReplicasCacheServiceInfinispan() {
* model specification.
*/
@Test
public void testMinimalCacheServiceInfinispanWithAutoscale() {
public void testMinimalInfinispanWithAutoscale() {
INFINISPAN_OPERATOR_PROVISIONER.subscribe();
try {
name = "example-infinispan";
Infinispan infinispan = new InfinispanBuilder(name, matchLabels)
.replicas(2)
.service(new InfinispanServiceSpecBuilder()
.type(Service.Type.Cache)
.type(Service.Type.DataGrid)
.build())
.autoscale(new AutoscaleBuilder()
.maxReplicas(5)
Expand All @@ -214,7 +190,7 @@ public void testMinimalCacheServiceInfinispanWithAutoscale() {
.minMemUsagePercent(30L).build())
.build();

verifyMinimalCacheServiceInfinispanWithAutoscale(infinispan, true);
verifyMinimalInfinispanWithAutoscale(infinispan, true);
} finally {
INFINISPAN_OPERATOR_PROVISIONER.unsubscribe();
}
Expand Down Expand Up @@ -382,7 +358,7 @@ private void verifyMinimalTwoReplicasInfinispan(Infinispan infinispan, boolean w
/**
* Verify that two replicas are up and running and that have the relevant properties set to the same values
*/
private void verifyMinimalCacheServiceInfinispanWithAutoscale(Infinispan infinispan, boolean waitForPods) {
private void verifyMinimalInfinispanWithAutoscale(Infinispan infinispan, boolean waitForPods) {
createAndVerifyInfinispan(infinispan);
if (waitForPods) {
// a correct number of Infinispan CRs has been created
Expand Down

0 comments on commit 4f419ea

Please sign in to comment.