mirror of
https://github.com/Alfresco/alfresco-transform-core.git
synced 2025-08-14 17:58:27 +00:00
AIO: Obtain classes and resources from the 5 t-engines
This commit is contained in:
@@ -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(", ", " ", "")));
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
|
@@ -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[][]{
|
||||
|
@@ -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:")));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user