Skip to content

Commit 3645204

Browse files
committed
Add some logging for test BeanPersistControllerTest
1 parent e92621a commit 3645204

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

ebean-test/src/test/java/io/ebean/xtest/event/BeanPersistControllerTest.java

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
import io.ebean.event.BeanPersistAdapter;
1111
import io.ebean.event.BeanPersistRequest;
1212
import org.junit.jupiter.api.Test;
13+
import org.slf4j.Logger;
14+
import org.slf4j.LoggerFactory;
1315
import org.tests.model.basic.EBasicVer;
1416
import org.tests.model.basic.UTDetail;
1517
import org.tests.model.basic.UTMaster;
@@ -22,13 +24,15 @@
2224

2325
public class BeanPersistControllerTest {
2426

27+
private static final Logger log = LoggerFactory.getLogger(BeanPersistControllerTest.class);
28+
2529
private final PersistAdapter continuePersistingAdapter = new PersistAdapter(true);
2630

2731
private final PersistAdapter stopPersistingAdapter = new PersistAdapter(false);
2832

2933
@Test
3034
public void issued1() {
31-
Database db = getDatabase(continuePersistingAdapter);
35+
Database db = createDatabase(continuePersistingAdapter);
3236

3337
UTMaster bean0 = new UTMaster("m0");
3438
bean0.setJournal(new UTMaster.Journal());
@@ -47,11 +51,12 @@ public void issued1() {
4751
assertThat(journal.getEntries()).hasSize(2);
4852

4953
db.shutdown();
54+
log.info("done issued1");
5055
}
5156

5257
@Test
5358
public void issue_1341() {
54-
Database db = getDatabase(continuePersistingAdapter);
59+
Database db = createDatabase(continuePersistingAdapter);
5560

5661
UTMaster bean0 = new UTMaster("one0");
5762
UTDetail detail0 = new UTDetail("detail0", 12, 23D);
@@ -77,12 +82,13 @@ public void issue_1341() {
7782
}
7883

7984
db.shutdown();
85+
log.info("done issue_1341");
8086
}
8187

8288
@Test
8389
public void testInsertUpdateDelete_given_continuePersistingAdapter() {
8490

85-
Database db = getDatabase(continuePersistingAdapter);
91+
Database db = createDatabase(continuePersistingAdapter);
8692

8793
EBasicVer bean = new EBasicVer("testController");
8894

@@ -102,12 +108,13 @@ public void testInsertUpdateDelete_given_continuePersistingAdapter() {
102108
assertThat(continuePersistingAdapter.methodsCalled).containsExactly("preDelete", "postDelete");
103109

104110
db.shutdown();
111+
log.info("done testInsertUpdateDelete_given_continuePersistingAdapter");
105112
}
106113

107114
@Test
108115
public void testInsertUpdateDelete_given_stopPersistingAdapter() {
109116

110-
Database db = getDatabase(stopPersistingAdapter);
117+
Database db = createDatabase(stopPersistingAdapter);
111118

112119
EBasicVer bean = new EBasicVer("testController");
113120

@@ -138,9 +145,10 @@ public void testInsertUpdateDelete_given_stopPersistingAdapter() {
138145
stopPersistingAdapter.methodsCalled.clear();
139146

140147
db.shutdown();
148+
log.info("done testInsertUpdateDelete_given_stopPersistingAdapter");
141149
}
142150

143-
private Database getDatabase(PersistAdapter persistAdapter) {
151+
private Database createDatabase(PersistAdapter persistAdapter) {
144152
DatabaseBuilder config = new DatabaseConfig();
145153
config.setName("h2ebasicver");
146154
config.loadFromProperties();

0 commit comments

Comments
 (0)