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 24, 2024
1 parent 622e2cb commit b67e4e7
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 @@ -80,9 +80,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 @@ -98,9 +98,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 @@ -113,7 +113,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 b67e4e7

Please sign in to comment.