Skip to content

Commit 67df377

Browse files
committed
Upgrade to bootique-logback 1.5.18 #72
.. adding a small delay to LogTester to increase the probability that the files are flushed
1 parent 43e3e7b commit 67df377

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

RELEASE-NOTES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## 4.0-M1
22

33
* #71 Remove deprecated "bootique-logback-sentry" module
4+
* #72 Upgrade to bootique-logback 1.5.18
45

56
## 3.0-M4
67

bootique-logback/src/test/java/io/bootique/logback/LogbackBQConfigIT.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,10 +247,10 @@ public void fileAppender_Rotate_By_Size() {
247247
* Checks file appender with rolling policy "size" (SizeAndTimeBasedRollingPolicy)
248248
* <p>
249249
* This test makes 4 attempts of printing 2 log rows each second.
250-
* Logback configuration defines rollover by seconds with help of file name pattern;
250+
* Logback configuration defines rollover by seconds with the help of file name pattern;
251251
* 5 seconds of total history and size of each file is 40 bytes.
252252
* <p>
253-
* As result, 2 archived files + 1 current log-file are expected; 6 rows are expected in all log files
253+
* As a result, 2 archived files + 1 current log-file are expected; 6 rows are expected in all log files
254254
*/
255255
@Test
256256
public void fileAppender_Rotate_By_Size_And_History() {

bootique-logback/src/test/java/io/bootique/logback/unit/LogTester.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,21 +73,22 @@ public String run(String appConfig, String logFile, Consumer<Logger> logger) {
7373
public Map<String, String> run(String appConfig, Consumer<Logger> logger) {
7474
try {
7575
return doRun(appConfig, logger);
76-
} catch (IOException e) {
76+
} catch (Exception e) {
7777
throw new RuntimeException(e);
7878
}
7979
}
8080

81-
private Map<String, String> doRun(String appConfig, Consumer<Logger> logger) throws IOException {
81+
private Map<String, String> doRun(String appConfig, Consumer<Logger> logger) throws IOException, InterruptedException {
8282

8383
BQRuntime app = testFactory.app("-c", appConfig)
8484
.module(LogbackModule.class)
8585
.createRuntime();
8686

8787
logger.accept(app.getInstance(Logger.class));
8888

89-
// must stop to ensure logs are flushed...
89+
// must stop and wait to ensure logs are flushed...
9090
app.shutdown();
91+
Thread.sleep(50);
9192

9293
return logsByFile();
9394
}

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
</modules>
4545

4646
<properties>
47-
<logback.version>1.5.5</logback.version>
47+
<logback.version>1.5.18</logback.version>
4848
<logback.contrib.version>0.1.5</logback.contrib.version>
4949
</properties>
5050

0 commit comments

Comments
 (0)