From 17e4a59048fc049c1aa430674433ce7079b749e7 Mon Sep 17 00:00:00 2001 From: achettyiitr Date: Fri, 5 Jan 2024 18:24:45 +0530 Subject: [PATCH] chore: improve error logging --- services/rsources/handler_test.go | 10 +++++----- services/rsources/handler_v1_test.go | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/services/rsources/handler_test.go b/services/rsources/handler_test.go index 47ce02b43e..fe7c7f7719 100644 --- a/services/rsources/handler_test.go +++ b/services/rsources/handler_test.go @@ -918,7 +918,7 @@ var _ = Describe("Using sources handler", func() { return false } return true - }, "30s", "100ms").Should(BeTrue(), "Failed Records from both services should be the same", mustMarshal(failedKeysA), mustMarshal(failedKeysB), mustMarshal(expected), err) + }, "30s", "100ms").Should(BeTrue(), "Failed Records from both services should be the same", string(mustMarshal(failedKeysA)), string(mustMarshal(failedKeysB)), string(mustMarshal(expected)), err) }) It("should be able to create the same services again and not affect publications and subscriptions", func() { @@ -1203,7 +1203,7 @@ var _ = Describe("Using sources handler", func() { return false } return true - }, "30s", "100ms").Should(BeTrue(), "Failed Records from both services should be the same", mustMarshal(failedKeysA), mustMarshal(failedKeysB), mustMarshal(expected), err) + }, "30s", "100ms").Should(BeTrue(), "Failed Records from both services should be the same", string(mustMarshal(failedKeysA)), string(mustMarshal(failedKeysB)), string(mustMarshal(expected)), err) jobRunId := newJobRunId() addFailedRecords(pgA.db, jobRunId, defaultJobTargetKey, serviceA, []FailedRecord{ @@ -1270,7 +1270,7 @@ var _ = Describe("Using sources handler", func() { return false } return true - }, "30s", "100ms").Should(BeTrue(), "Failed Records from both services should be the same", mustMarshal(failedKeysA), mustMarshal(failedKeysB), mustMarshal(expected), err) + }, "30s", "100ms").Should(BeTrue(), "Failed Records from both services should be the same", string(mustMarshal(failedKeysA)), string(mustMarshal(failedKeysB)), string(mustMarshal(expected)), err) }) It("should be able to add a code column to rsources_failed_keys_v2_records table seamlessly, without affecting logical replication", func() { @@ -1417,7 +1417,7 @@ var _ = Describe("Using sources handler", func() { return false } return true - }, "30s", "100ms").Should(BeTrue(), "Failed Records from both services should be the same", mustMarshal(failedKeysA), mustMarshal(failedKeysB), mustMarshal(expected), err) + }, "30s", "100ms").Should(BeTrue(), "Failed Records from both services should be the same", string(mustMarshal(failedKeysA)), string(mustMarshal(failedKeysB)), string(mustMarshal(expected)), err) jobRunId := newJobRunId() addFailedRecords(pgA.db, jobRunId, defaultJobTargetKey, serviceA, []FailedRecord{ @@ -1484,7 +1484,7 @@ var _ = Describe("Using sources handler", func() { return false } return true - }, "30s", "100ms").Should(BeTrue(), "Failed Records from both services should be the same", mustMarshal(failedKeysA), mustMarshal(failedKeysB), mustMarshal(expected), err) + }, "30s", "100ms").Should(BeTrue(), "Failed Records from both services should be the same", string(mustMarshal(failedKeysA)), string(mustMarshal(failedKeysB)), string(mustMarshal(expected)), err) }) }) }) diff --git a/services/rsources/handler_v1_test.go b/services/rsources/handler_v1_test.go index b4dc9c7ee1..7c5f1f1143 100644 --- a/services/rsources/handler_v1_test.go +++ b/services/rsources/handler_v1_test.go @@ -457,7 +457,7 @@ var _ = Describe("Using sources handler v1", func() { return false } return true - }, "30s", "100ms").Should(BeTrue(), "Failed Records from both services should be the same", mustMarshal(failedKeysA), mustMarshal(failedKeysB), mustMarshal(expected), err) + }, "30s", "100ms").Should(BeTrue(), "Failed Records from both services should be the same", string(mustMarshal(failedKeysA)), string(mustMarshal(failedKeysB)), string(mustMarshal(expected)), err) }) }) })