mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-21 07:06:19 +00:00
No effective change - add a test for saveAll() with existing batch mode on
Assert that it does not flush the batch. We want the batch to continue and flush normally.
This commit is contained in:
1 parent
ef05b81014
commit
84d3578e33
2 files changed
+52
No files matched your search
@@ -52,6 +52,10 @@ public class LoggedSqlCollector {
|
||||
return basicAppender.collectEnd();
|
||||
}
|
||||
|
||||
public static List<String> current() {
|
||||
return basicAppender.collectContinue();
|
||||
}
|
||||
|
||||
private static class BasicAppender extends UnsynchronizedAppenderBase<ILoggingEvent> {
|
||||
|
||||
List<String> messages = new ArrayList<>();
|
||||
@@ -85,5 +89,14 @@ public class LoggedSqlCollector {
|
||||
return tempMessages;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the collected SQL and continue.
|
||||
*/
|
||||
List<String> collectContinue() {
|
||||
List<String> tempMessages = messages;
|
||||
messages = new ArrayList<>();
|
||||
return tempMessages;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user