diff --git a/engines/base/src/main/java/org/alfresco/transform/base/probes/ProbeTransform.java b/engines/base/src/main/java/org/alfresco/transform/base/probes/ProbeTransform.java index a2d6cec00..254f4ba2c 100644 --- a/engines/base/src/main/java/org/alfresco/transform/base/probes/ProbeTransform.java +++ b/engines/base/src/main/java/org/alfresco/transform/base/probes/ProbeTransform.java @@ -93,9 +93,9 @@ public class ProbeTransform private long maxTime = Long.MAX_VALUE; private long nextTransformTime; - private boolean livenessTransformEnabled; + private final boolean livenessTransformEnabled; private final long livenessTransformPeriod; - private long maxTransformCount; + private final long maxTransformCount; private long maxTransformTime; private final AtomicBoolean initialised = new AtomicBoolean(false); @@ -166,16 +166,6 @@ private long getPositiveLongEnv(String name, long defaultValue) return l; } - public void setLivenessTransformEnabled(boolean enabled) - { - livenessTransformEnabled = enabled; - } - - public void setMaxTransformCount(long transforms) - { - maxTransformCount = transforms; - } - // We don't want to be doing test transforms every few seconds, but do want frequent live probes. public String doTransformOrNothing(boolean isLiveProbe, TransformHandler transformHandler) { diff --git a/engines/base/src/test/java/org/alfresco/transform/base/AbstractBaseTest.java b/engines/base/src/test/java/org/alfresco/transform/base/AbstractBaseTest.java index ca9d9add2..882512442 100644 --- a/engines/base/src/test/java/org/alfresco/transform/base/AbstractBaseTest.java +++ b/engines/base/src/test/java/org/alfresco/transform/base/AbstractBaseTest.java @@ -66,9 +66,7 @@ import static java.nio.file.StandardCopyOption.REPLACE_EXISTING; import static org.alfresco.transform.common.RequestParamMap.DIRECT_ACCESS_URL; -import static org.alfresco.transform.common.RequestParamMap.ENDPOINT_READY; import static org.alfresco.transform.common.RequestParamMap.ENDPOINT_TRANSFORM; -import static org.hamcrest.Matchers.containsString; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.when; @@ -86,7 +84,6 @@ */ @SpringBootTest(classes={org.alfresco.transform.base.Application.class}) @AutoConfigureMockMvc - public abstract class AbstractBaseTest { // Added as part of ATS-702 to allow test resources to be read from the imported jar files to prevent test @@ -314,28 +311,6 @@ public void simpleTransformTest() throws Exception "attachment; filename*=UTF-8''transform." + targetExtension)); } - @Test - public void readinessShouldReturnAnErrorAfterReachingMaxTransforms() throws Exception - { - controller.getProbeTransform().setLivenessTransformEnabled(true); - controller.getProbeTransform().setMaxTransformCount(10); - - int max_transforms = 11; - for (int i = 0; i