From 996c0da926ea6eb2317e8541d5680b9ef7c31b2a Mon Sep 17 00:00:00 2001 From: Jacob Eliat-Eliat Date: Wed, 27 Nov 2024 16:53:02 +0100 Subject: [PATCH] fix test --- src/main/scala/cognite/spark/v1/FileContentRelation.scala | 2 +- src/test/scala/cognite/spark/v1/FileContentRelationTest.scala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/scala/cognite/spark/v1/FileContentRelation.scala b/src/main/scala/cognite/spark/v1/FileContentRelation.scala index d581aa674..0c2e110a3 100644 --- a/src/main/scala/cognite/spark/v1/FileContentRelation.scala +++ b/src/main/scala/cognite/spark/v1/FileContentRelation.scala @@ -122,7 +122,7 @@ class FileContentRelation(config: RelationConfig, fileExternalId: String, inferS .handleErrorWith { case e: fs2.text.LineTooLongException => throw new CdfSparkException( - s"""Line too long in file with external id: "$fileExternalId" SizeLimit in characters: $e.max, but $e.length characters accumulated""", + s"""Line too long in file with external id: "$fileExternalId" SizeLimit in characters: ${e.max}, but ${e.length} characters accumulated""", e) case other => throw other diff --git a/src/test/scala/cognite/spark/v1/FileContentRelationTest.scala b/src/test/scala/cognite/spark/v1/FileContentRelationTest.scala index 133d57939..09cd60996 100644 --- a/src/test/scala/cognite/spark/v1/FileContentRelationTest.scala +++ b/src/test/scala/cognite/spark/v1/FileContentRelationTest.scala @@ -251,7 +251,7 @@ class FileContentRelationTest extends FlatSpec with Matchers with SparkTest wit override val lineSizeLimitCharacters: Int = 5 } - val expectedMessage = "Line too long in file with external id: \"fileContentTransformationFile\" SizeLimit in characters: 5" + val expectedMessage = "Line too long in file with external id: \"fileContentTransformationFile\" SizeLimit in characters: 5, but 47 characters accumulated" val exception = sparkIntercept { relation.createDataFrame }