@@ -919,14 +919,16 @@ func (s ClickHouseSuite) testNumericTruncation(unbNumAsStringFf bool) {
919919 }
920920 if totalTruncated > 0 {
921921 EnvWaitFor (s .t , env , 5 * time .Minute , "waiting for truncated messages" , func () bool {
922+ msg := "truncated 1 NUMERIC value too precise to fit into the destination column"
922923 count , err := GetLogCount (
923- s .t .Context (), numericCatalogPool , flowJobName , "warn" , "truncated 1 NUMERIC value too precise to fit into the destination column" ,
924+ s .t .Context (), numericCatalogPool , flowJobName , "warn" , msg ,
924925 )
925926 return err == nil && count == totalTruncated * 2 // positive and negative
926927 })
927928 EnvWaitFor (s .t , env , 5 * time .Minute , "waiting for truncated array messages" , func () bool {
929+ msg := "truncated 2 NUMERIC values too precise to fit into the destination column"
928930 count , err := GetLogCount (
929- s .t .Context (), numericCatalogPool , flowJobName , "warn" , "truncated 2 NUMERIC values too precise to fit into the destination column" ,
931+ s .t .Context (), numericCatalogPool , flowJobName , "warn" , msg ,
930932 )
931933 return err == nil && count == totalTruncated
932934 })
@@ -938,28 +940,32 @@ func (s ClickHouseSuite) testNumericTruncation(unbNumAsStringFf bool) {
938940
939941 if totalCleared > 0 {
940942 EnvWaitFor (s .t , env , 5 * time .Minute , "waiting for cleared messages" , func () bool {
943+ msg := "cleared 1 NUMERIC value too big to fit into the destination column"
941944 count , err := GetLogCount (
942- s .t .Context (), numericCatalogPool , flowJobName , "warn" , "cleared 1 NUMERIC value too big to fit into the destination column" ,
945+ s .t .Context (), numericCatalogPool , flowJobName , "warn" , msg ,
943946 )
944947 return err == nil && count == totalCleared * 2 * 2 // positive and negative, snapshot and cdc
945948 })
946949 EnvWaitFor (s .t , env , 5 * time .Minute , "waiting for cleared array messages" , func () bool {
950+ msg := "cleared 2 NUMERIC values too big to fit into the destination column"
947951 count , err := GetLogCount (
948- s .t .Context (), numericCatalogPool , flowJobName , "warn" , "cleared 2 NUMERIC values too big to fit into the destination column" ,
952+ s .t .Context (), numericCatalogPool , flowJobName , "warn" , msg ,
949953 )
950954 return err == nil && count == totalCleared * 2 // snapshot and cdc
951955 })
952956 }
953957 if totalTruncated > 0 {
954958 EnvWaitFor (s .t , env , 5 * time .Minute , "waiting for truncated messages" , func () bool {
959+ msg := "truncated 1 NUMERIC value too precise to fit into the destination column"
955960 count , err := GetLogCount (
956- s .t .Context (), numericCatalogPool , flowJobName , "warn" , "truncated 1 NUMERIC value too precise to fit into the destination column" ,
961+ s .t .Context (), numericCatalogPool , flowJobName , "warn" , msg ,
957962 )
958963 return err == nil && count == totalTruncated * 2 * 2 // positive and negative, snapshot and cdc
959964 })
960965 EnvWaitFor (s .t , env , 5 * time .Minute , "waiting for truncated array messages" , func () bool {
966+ msg := "truncated 2 NUMERIC values too precise to fit into the destination column"
961967 count , err := GetLogCount (
962- s .t .Context (), numericCatalogPool , flowJobName , "warn" , "truncated 2 NUMERIC values too precise to fit into the destination column" ,
968+ s .t .Context (), numericCatalogPool , flowJobName , "warn" , msg ,
963969 )
964970 return err == nil && count == totalTruncated * 2 // snapshot and cdc
965971 })
0 commit comments