Skip to content

Commit

Permalink
Updated processor tests with emptyLogRecordArguments updates
Browse files Browse the repository at this point in the history
  • Loading branch information
evanlauer1 committed Jul 31, 2024
1 parent 4975d8e commit 8927276
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions sdk/test/OpenTelemetry/LogRecordProcessorSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ spec = describe "LogRecordProcessor" $ do
let lp = createLoggerProvider [processor] emptyLoggerProviderOptions
l = makeLogger lp "Test Library"

emitLogRecord l (emptyLogRecordArguments ("something" :: T.Text))
emitLogRecord l (emptyLogRecordArguments ("another thing" :: T.Text))
emitLogRecord l (emptyLogRecordArguments ("a third thing" :: T.Text))
emitLogRecord l emptyLogRecordArguments
emitLogRecord l emptyLogRecordArguments
emitLogRecord l emptyLogRecordArguments

-- WARNING: There might be a better way to ensure exporting than forceFlush
forceFlushLoggerProvider Nothing lp
Expand All @@ -103,9 +103,9 @@ spec = describe "LogRecordProcessor" $ do
let lp = createLoggerProvider [processor, processorNoShutdown] emptyLoggerProviderOptions
l = makeLogger lp "Test Library"

emitLogRecord l (emptyLogRecordArguments ("something" :: T.Text))
emitLogRecord l (emptyLogRecordArguments ("another thing" :: T.Text))
emitLogRecord l (emptyLogRecordArguments ("a third thing" :: T.Text))
emitLogRecord l emptyLogRecordArguments
emitLogRecord l emptyLogRecordArguments
emitLogRecord l emptyLogRecordArguments

-- WARNING: There might be a better way to ensure exporting than forceFlush
shutdownLoggerProvider Nothing lp
Expand All @@ -118,7 +118,7 @@ spec = describe "LogRecordProcessor" $ do
Success -> False
Failure _ -> True

lr <- emitLogRecord l (emptyLogRecordArguments ("a bad one" :: T.Text))
lr <- emitLogRecord l emptyLogRecordArguments
logRecordProcessorOnEmit processorNoShutdown lr Context.empty
numExportsNoShutdown <- readIORef numExportsNoShutdownRef
numExportsNoShutdown `shouldBe` 3

0 comments on commit 8927276

Please sign in to comment.