Skip to content
This repository was archived by the owner on Mar 24, 2025. It is now read-only.

Commit ec61b93

Browse files
committed
Another try at fixing tests
1 parent 7f3cab5 commit ec61b93

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/test/scala/com/databricks/spark/xml/XmlSuite.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,8 @@ final class XmlSuite extends AnyFunSuite with BeforeAndAfterAll {
195195
.collect()
196196
val attrValOne = results(0).getStruct(0).getAs[Date](1)
197197
val attrValTwo = results(1).getStruct(0).getAs[Date](1)
198-
assert(attrValOne === new Date(635839200000L)) // 1990-02-24
199-
assert(attrValTwo === new Date(473407200000L)) // 1985-01-01
198+
assert(attrValOne.toString === "1990-02-24")
199+
assert(attrValTwo.toString === "1985-01-01")
200200
assert(results.length === numAges)
201201
}
202202

@@ -953,7 +953,7 @@ final class XmlSuite extends AnyFunSuite with BeforeAndAfterAll {
953953
.collect()
954954
val attrValOne = results(0).getStruct(0)(1)
955955
val attrValTwo = results(1).getStruct(0)(0)
956-
assert(attrValOne === new Date(635839200000L)) // 1990-02-24
956+
assert(attrValOne.toString === "1990-02-24")
957957
assert(attrValTwo === 30)
958958
assert(results.length === numAges)
959959
}
@@ -1375,7 +1375,7 @@ final class XmlSuite extends AnyFunSuite with BeforeAndAfterAll {
13751375
.option("rowTag", "book")
13761376
.schema(schema)
13771377
.xml(dateFile)
1378-
assert(df.collect().head.getAs[Date](1) === new Date(1609480800000L)) // 2021-01-01
1378+
assert(df.collect().head.getAs[Date](1).toString === "2021-01-01")
13791379
}
13801380

13811381
test("Test date type inference") {

0 commit comments

Comments
 (0)