File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -120,18 +120,25 @@ void main() {
120
120
output.output (event0);
121
121
await output.destroy ();
122
122
123
+ // Give the OS a chance to flush to the file system (should reduce flakiness)
124
+ await Future .delayed (const Duration (milliseconds: 50 ));
125
+
123
126
// Start again to roll files on init without waiting for timer tick
124
127
await output.init ();
125
128
final event1 = OutputEvent (LogEvent (Level .fatal, "" ), ["2" * 1500 ]);
126
129
output.output (event1);
127
130
await output.destroy ();
128
131
132
+ await Future .delayed (const Duration (milliseconds: 50 ));
133
+
129
134
// And again for another roll
130
135
await output.init ();
131
136
final event2 = OutputEvent (LogEvent (Level .fatal, "" ), ["3" * 1500 ]);
132
137
output.output (event2);
133
138
await output.destroy ();
134
139
140
+ await Future .delayed (const Duration (milliseconds: 50 ));
141
+
135
142
final files = dir.listSync ();
136
143
137
144
// Expect only 2 files: the "latest" that is the current log file
You can’t perform that action at this time.
0 commit comments