Remove System.err.println from tests

This commit is contained in:
Mahmoud Ben Hassine
2023-06-07 15:45:51 +02:00
parent 27e2ab02c0
commit 7f80b7230b
25 changed files with 30 additions and 66 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2022 the original author or authors.
* Copyright 2006-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -30,6 +30,7 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
/**
* @author Dave Syer
* @author Mahmoud Ben Hassine
*
*/
class JobRegistryBeanPostProcessorTests {
@@ -103,7 +104,6 @@ class JobRegistryBeanPostProcessorTests {
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("test-context.xml", getClass());
MapJobRegistry registry = (MapJobRegistry) context.getBean("registry");
Collection<String> configurations = registry.getJobNames();
// System.err.println(configurations);
String[] names = context.getBeanNamesForType(JobSupport.class);
int count = names.length;
// Each concrete bean of type JobConfiguration is registered...

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2022 the original author or authors.
* Copyright 2002-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -169,7 +169,6 @@ class ChunkElementParserTests {
@Test
void testRetryable() throws Exception {
Map<Class<? extends Throwable>, Boolean> retryable = getRetryableExceptionClasses("s1", getContext());
System.err.println(retryable);
assertEquals(3, retryable.size());
containsClassified(retryable, PessimisticLockingFailureException.class, true);
containsClassified(retryable, CannotSerializeTransactionException.class, false);
@@ -178,7 +177,6 @@ class ChunkElementParserTests {
@Test
void testRetryableInherited() throws Exception {
Map<Class<? extends Throwable>, Boolean> retryable = getRetryableExceptionClasses("s3", getContext());
System.err.println(retryable);
assertEquals(2, retryable.size());
containsClassified(retryable, IOException.class, true);
}
@@ -186,7 +184,6 @@ class ChunkElementParserTests {
@Test
void testRetryableInheritedMerge() throws Exception {
Map<Class<? extends Throwable>, Boolean> retryable = getRetryableExceptionClasses("s4", getContext());
System.err.println(retryable);
assertEquals(3, retryable.size());
containsClassified(retryable, IOException.class, true);
}
@@ -194,7 +191,6 @@ class ChunkElementParserTests {
@Test
void testInheritSkippable() throws Exception {
Map<Class<? extends Throwable>, Boolean> skippable = getSkippableExceptionClasses("s1", getContext());
System.err.println(skippable);
assertEquals(5, skippable.size());
containsClassified(skippable, NullPointerException.class, true);
containsClassified(skippable, ArithmeticException.class, true);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2022 the original author or authors.
* Copyright 2006-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -36,6 +36,7 @@ import org.springframework.test.util.ReflectionTestUtils;
/**
* @author Thomas Risberg
* @author Mahmoud Ben Hassine
*/
@SpringJUnitConfig
class StepWithSimpleTaskJobParserTests {
@@ -74,7 +75,6 @@ class StepWithSimpleTaskJobParserTests {
}
private TestTasklet assertTasklet(Job job, String stepName, String taskletName) {
System.err.println(((FlowJob) job).getStepNames());
Step step = ((FlowJob) job).getStep(stepName);
assertTrue(step instanceof TaskletStep, "Wrong type for step name=" + stepName + ": " + step);
Object tasklet = ReflectionTestUtils.getField(step, "tasklet");

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2022 the original author or authors.
* Copyright 2006-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -36,6 +36,7 @@ import org.junit.jupiter.params.provider.MethodSource;
* use in the ExecutionContext around daylight savings.
*
* @author Dave Syer
* @author Mahmoud Ben Hassine
*
*/
class DateFormatTests {
@@ -55,7 +56,6 @@ class DateFormatTests {
GregorianCalendar calendar = new GregorianCalendar(TimeZone.getTimeZone("GMT"), Locale.UK);
calendar.setTime(date);
// System.err.println(format.toPattern() + " + " + input + " --> " +
// calendar.getTime());
// This assertion is true...

View File

@@ -536,7 +536,6 @@ class FaultTolerantStepFactoryBeanRetryTests {
assertEquals(7, provided.size());
// [a, b, c, a, b, c, a, b, c, a, b, c, a, b, c, a, b, c, d, e, f, d,
// e, f, d, e, f, d, e, f, d, e, f, d, e, f]
// System.err.println(processed);
assertEquals(36, processed.size());
// [b, d]
assertEquals(2, recovered.size());

View File

@@ -134,8 +134,6 @@ class AsyncTaskletStepTests {
assertTrue(stepExecution.getReadCount() >= 25);
assertTrue(processed.size() >= 25);
// System.err.println(stepExecution.getCommitCount());
// System.err.println(processed);
// Check commit count didn't spin out of control waiting for other
// threads to finish...
assertTrue(stepExecution.getCommitCount() > processed.size() / 2,