#543 - Tidy up test logging - adjust test LoggedSqlCollector - remove logging noise when running tests

This commit is contained in:
Robin Bygrave committed 2016-01-27 19:05:19 +13:00
1 parent 5a463c5071
commit 53dd91416c
61 files changed
+82 -232

No files matched your search

@@ -30,7 +30,7 @@ public class ChangeJsonBuilderTest extends BaseTestCase {
for (int i = 0; i < changes.size(); i++) {
StringWriter buffer = new StringWriter();
builder.writeBeanJson(buffer, changes.get(i), changeSet, i);
System.out.println(buffer.toString());
assertThat(buffer.toString()).contains("\"source\"");
assertThat(buffer.toString()).contains("\"userId\"");
assertThat(buffer.toString()).contains("\"userIpAddress\"");
@@ -19,8 +19,6 @@ public class DeployPropertyParserMapTests {
DeployPropertyParserMap parser = new DeployPropertyParserMap(map);
String output = parser.parse("(lower(customer.name) like ? escape'' or id > ?)");
System.out.println(output);
Assert.assertEquals("(lower(t1.name) like ? escape'' or t0.id > ?)", output);
}
@@ -49,8 +49,6 @@ public class TestDataSourceMax extends BaseTestCase {
bg.execute(new ConnRunner(pool, 4000, i));
}
System.out.println("main thread sleep ... " + pool.getStatus(false));
Thread.sleep(10000);
pool.getStatistics(true);
@@ -81,9 +79,7 @@ public class TestDataSourceMax extends BaseTestCase {
private void waitSomeTime(long count) {
try {
System.out.println(position+" sleep " + sleepMillis+" count:"+count);
Thread.sleep(sleepMillis);
System.out.println(position+" sleep done");
} catch (InterruptedException e){
throw new RuntimeException(e);
}
@@ -30,9 +30,6 @@ public class TestDataSourceMaxWithEntity extends BaseTestCase {
bg.execute(new ConnRunner(server, 4000, i));
}
System.out.println("main thread sleep ... ");
Thread.sleep(30000);
server.shutdown(true, false);
@@ -24,7 +24,6 @@ public class TestRawSqlParsing extends TestCase {
Sql rs = rawSql.getSql();
String s = rs.toString();
System.out.println(s);
assertTrue(s, s.contains("[order_id, sum"));
}
@@ -42,7 +42,6 @@ public class TestJsonWriteVisitor extends BaseTestCase {
options.setPathVisitor("contacts", new ContactVisitor());
String jsonContent = json.toJson(list, options);
System.out.println(jsonContent);
assertThat(jsonContent).contains("customerExtra");
assertThat(jsonContent).contains("contactExtra");
@@ -42,14 +42,11 @@ public class TestTextJsonBeanReadVisitor extends BaseTestCase {
options.addVisitor("shippingAddress", new ASVisitor());
String s = json.toJson(list);
System.out.println(s);
List<Customer> mList = json.toList(Customer.class, s, options);
System.out.println("VIA STRING: " + mList);
StringReader reader = new StringReader(s);
List<Customer> mList2 = json.toList(Customer.class, reader);
System.out.println("VIA READER: " + mList2);
assertEquals(mList.size(), mList2.size());
}
@@ -58,28 +55,28 @@ public class TestTextJsonBeanReadVisitor extends BaseTestCase {
@Override
public void visit(Customer bean, Map<String, Object> unmapped) {
System.out.println("visit customer: " + bean);
bean.getId();
}
}
private static class AVisitor implements JsonReadBeanVisitor<Address> {
public void visit(Address bean, Map<String, Object> unmapped) {
System.out.println("visit billing address: " + bean);
bean.getId();
}
}
private static class ASVisitor implements JsonReadBeanVisitor<Address> {
public void visit(Address bean, Map<String, Object> unmapped) {
System.out.println("visit shipping address: " + bean);
bean.getId();
}
}
private static class ContactVisitor implements JsonReadBeanVisitor<Contact> {
public void visit(Contact bean, Map<String, Object> unmapped) {
System.out.println("visit contact: " + bean);
bean.getId();
}
}
}
@@ -17,8 +17,6 @@ public class ScalarTypeLocalDateTest {
LocalDate date = LocalDate.of(2014, 5, 20);
long millis = type.convertToMillis(date);
System.out.println(date);
LocalDate parseDate = type.convertFromMillis(millis);
assertEquals(date, parseDate);
}