RED-4890: Refactored redaction log tests to show failed files
This commit is contained in:
parent
f4655c4050
commit
f5fb8f7c07
@ -85,7 +85,9 @@ import com.iqser.red.storage.commons.StorageAutoConfiguration;
|
||||
import com.iqser.red.storage.commons.service.StorageService;
|
||||
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@Slf4j
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(classes = Application.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
||||
@Import(RulesTest.RulesTestConfiguration.class)
|
||||
@ -265,10 +267,10 @@ public class RulesTest {
|
||||
}
|
||||
|
||||
if (!failedFiles.isEmpty()) {
|
||||
System.out.println("WARNING: " + failedFiles.size() + " files from " + fileSize + " failed");
|
||||
log.warn("WARNING: {} files from {} failed", failedFiles.size(), fileSize);
|
||||
for (String fileName : failedFiles.keySet()) {
|
||||
System.out.println(" - '" + fileName + "' failed with Error: " + failedFiles.get(fileName) + " See line " + failedFiles.get(fileName)
|
||||
.getStackTrace()[0].getLineNumber() + " in " + failedFiles.get(fileName).getStackTrace()[0].getClassName());
|
||||
log.warn(" - '{}' failed with Error: {} See line {} in {}", fileName, failedFiles.get(fileName), failedFiles.get(fileName)
|
||||
.getStackTrace()[0].getLineNumber(), failedFiles.get(fileName).getStackTrace()[0].getClassName());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user