You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by ya...@apache.org on 2019/03/16 23:26:14 UTC
[spark] branch master updated: [SPARK-22000][SQL][FOLLOW-UP] Fix
bad test to ensure it can test properly
This is an automated email from the ASF dual-hosted git repository.
yamamuro pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new 4adbcdc [SPARK-22000][SQL][FOLLOW-UP] Fix bad test to ensure it can test properly
4adbcdc is described below
commit 4adbcdc42478b61fa02047d54f3d3705d5b1ecc7
Author: Jungtaek Lim (HeartSaVioR) <ka...@gmail.com>
AuthorDate: Sun Mar 17 08:25:40 2019 +0900
[SPARK-22000][SQL][FOLLOW-UP] Fix bad test to ensure it can test properly
## What changes were proposed in this pull request?
There was some mistake on test code: it has wrong assertion. The patch proposes fixing it, as well as fixing other stuff to make test really pass.
## How was this patch tested?
Fixed unit test.
Closes #24112 from HeartSaVioR/SPARK-22000-hotfix.
Authored-by: Jungtaek Lim (HeartSaVioR) <ka...@gmail.com>
Signed-off-by: Takeshi Yamamuro <ya...@apache.org>
---
.../java/test/org/apache/spark/sql/JavaBeanDeserializationSuite.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sql/core/src/test/java/test/org/apache/spark/sql/JavaBeanDeserializationSuite.java b/sql/core/src/test/java/test/org/apache/spark/sql/JavaBeanDeserializationSuite.java
index f59afef..c5f3867 100644
--- a/sql/core/src/test/java/test/org/apache/spark/sql/JavaBeanDeserializationSuite.java
+++ b/sql/core/src/test/java/test/org/apache/spark/sql/JavaBeanDeserializationSuite.java
@@ -154,7 +154,7 @@ public class JavaBeanDeserializationSuite implements Serializable {
List<RecordSpark22000> records = dataset.collectAsList();
- Assert.assertEquals(records, records);
+ Assert.assertEquals(expectedRecords, records);
}
@Test
@@ -211,7 +211,7 @@ public class JavaBeanDeserializationSuite implements Serializable {
record.setDoubleField(String.valueOf(recordRow.getDouble(4)));
record.setStringField(recordRow.getString(5));
record.setBooleanField(String.valueOf(recordRow.getBoolean(6)));
- record.setTimestampField(String.valueOf(recordRow.getTimestamp(7).getTime() * 1000));
+ record.setTimestampField(String.valueOf(recordRow.getTimestamp(7)));
// This would figure out that null value will not become "null".
record.setNullIntField(null);
return record;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org