From 89272761fbea4c60a45feaaa2bb6579be8f59a93 Mon Sep 17 00:00:00 2001 From: evanlauer1 Date: Mon, 22 Jul 2024 12:41:12 -0700 Subject: [PATCH] Updated processor tests with emptyLogRecordArguments updates --- sdk/test/OpenTelemetry/LogRecordProcessorSpec.hs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sdk/test/OpenTelemetry/LogRecordProcessorSpec.hs b/sdk/test/OpenTelemetry/LogRecordProcessorSpec.hs index dcbc4db9..07fe9d12 100644 --- a/sdk/test/OpenTelemetry/LogRecordProcessorSpec.hs +++ b/sdk/test/OpenTelemetry/LogRecordProcessorSpec.hs @@ -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 @@ -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 @@ -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