Skip to content

Commit 612e124

Browse files
author
José Valim
committed
Add tests for sync_threshold
1 parent abd2b35 commit 612e124

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/logger/test/logger_test.exs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,13 @@ defmodule LoggerTest do
175175
end
176176
end
177177

178+
test "log/2 relies on sync_threshold" do
179+
Logger.configure(sync_threshold: 0)
180+
for _ <- 1..1000, do: Logger.log(:info, "some message")
181+
after
182+
Logger.configure(sync_threshold: 20)
183+
end
184+
178185
test "stop the application silently" do
179186
Application.put_env(:logger, :backends, [])
180187
Logger.App.stop()

0 commit comments

Comments
 (0)