AIO: Obtain classes and resources from the 5 t-engines

This commit is contained in:
alandavis
2022-08-02 11:42:14 +01:00
parent 676ffa1f44
commit 53c0c252f9
24 changed files with 64 additions and 10340 deletions

View File

@@ -512,7 +512,7 @@ public class TransformHandler
sourceSizeInBytes, targetMimetype, transformOptions, null);
if (transformerName == null)
{
throw new TransformException(BAD_REQUEST, "No transforms were able to handle the request: "+
throw new TransformException(BAD_REQUEST, "No transforms for: "+
sourceMimetype+" -> "+targetMimetype+transformOptions.entrySet().stream()
.map(entry -> entry.getKey()+"="+entry.getValue())
.collect(Collectors.joining(", ", " ", "")));

View File

@@ -358,7 +358,15 @@ public class ProbeTransform
public void resetForTesting()
{
die.set(false);
probeCount = 0;
transCount = 0;
normalTime = 0;
maxTime = Long.MAX_VALUE;
nextTransformTime = 0;
initialised.set(false);
readySent.set(false);
transformCount.set(0);
die.set(false);
}
}

View File

@@ -77,7 +77,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
/**
* Super class for testing.
* Super class for unit testing.
*/
@SpringBootTest(classes={org.alfresco.transform.base.Application.class})
@AutoConfigureMockMvc
@@ -327,6 +327,7 @@ public abstract class AbstractBaseTest
public void calculateMaxTime() throws Exception
{
ProbeTransform probeTransform = controller.probeTransform;
probeTransform.resetForTesting();
probeTransform.setLivenessPercent(110);
long[][] values = new long[][]{

View File

@@ -410,6 +410,6 @@ public class TransformControllerTest
.param("unknown", "1"))
.andExpect(status().isBadRequest())
.andExpect(content().string(containsString("TwoCustomTransformers Error Page")))
.andExpect(content().string(containsString("No transforms were able to handle the request")));
.andExpect(content().string(containsString("No transforms for:")));
}
}