Sha256: c0791b40c4cfae53119dbda4746a4f3c3ba78f396fa629a58ba3c8f31ddf58ae
Contents?: true
Size: 1.11 KB
Versions: 1
Compression:
Stored size: 1.11 KB
Contents
require_relative '../test_helper' module Appender class AsyncTest < Minitest::Test describe SemanticLogger::Appender::Async do include InMemoryAppenderHelper describe 'with capped queue' do let :appender_options do {appender: appender, async: true} end it 'uses the async proxy' do assert_instance_of SemanticLogger::Appender::Async, added_appender end it 'logs message immediately' do logger.info('hello world') assert log = log_message assert_equal 'hello world', log.message end it 'uses an capped queue' do assert_instance_of SizedQueue, added_appender.queue end end describe 'with uncapped queue' do let :appender_options do {appender: appender, async: true, max_queue_size: -1} end it 'uses the async proxy' do assert_instance_of SemanticLogger::Appender::Async, added_appender end it 'uses an uncapped queue' do assert_instance_of Queue, added_appender.queue end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
semantic_logger-4.2.0 | test/appender/async_test.rb |