Skip to content
Snippets Groups Projects
Commit 0a3aebb7 authored by jakubs's avatar jakubs
Browse files

slighlty improve the checking of the registration status in the transformed...

slighlty improve the checking of the registration status in the transformed image representattions test

SVN: 26968
parent ab567aa1
No related branches found
No related tags found
No related merge requests found
......@@ -22,6 +22,8 @@ import java.io.IOException;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.commons.io.FileUtils;
import org.springframework.mock.web.MockHttpServletRequest;
......@@ -154,7 +156,11 @@ public class TransformedImageRepresentationsTest extends AbstractScreeningSystem
@Override
protected boolean checkLogContentForFinishedDataSetRegistration(String logContent)
{
return logContent.contains("Post registration of 4. of 4 data sets");
String pattern = "Post registration of ([0-9]*)\\. of \\1 data sets";
// matches "Post registration of n. of n data sets"
Pattern p = Pattern.compile(pattern);
Matcher m = p.matcher(logContent);
return m.find();
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment