mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +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:
@@ -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