spark-instrumented-optimizer/external
Gengliang Wang a717d219a6 [SPARK-30159][SQL][TESTS] Fix the method calls of QueryTest.checkAnswer
### What changes were proposed in this pull request?

Before this PR, the method `checkAnswer` in Object `QueryTest` returns an optional string. It doesn't throw exceptions when errors happen.
The actual exceptions are thrown in the trait `QueryTest`.

However, there are some test suites(`StreamSuite`, `SessionStateSuite`, `BinaryFileFormatSuite`, etc.) that use the no-op method `QueryTest.checkAnswer` and expect it to fail test cases when the execution results don't match the expected answers.

After this PR:
1. the method `checkAnswer` in Object `QueryTest` will fail tests on errors or unexpected results.
2. add a new method `getErrorMessageInCheckAnswer`, which is exactly the same as the previous version of `checkAnswer`. There are some test suites use this one to customize the test failure message.
3. for the test suites that extend the trait `QueryTest`, we should use the method `checkAnswer` directly, instead of calling the method from Object `QueryTest`.

### Why are the changes needed?

We should fix these method calls to perform actual validations in test suites.

### Does this PR introduce any user-facing change?

No.

### How was this patch tested?

Existing unit tests.

Closes #26788 from gengliangwang/fixCheckAnswer.

Authored-by: Gengliang Wang <gengliang.wang@databricks.com>
Signed-off-by: HyukjinKwon <gurwls223@apache.org>
2019-12-09 22:19:08 +09:00
..
avro [SPARK-30159][SQL][TESTS] Fix the method calls of QueryTest.checkAnswer 2019-12-09 22:19:08 +09:00
docker [SPARK-28683][BUILD] Upgrade Scala to 2.12.10 2019-09-18 13:30:36 -07:00
docker-integration-tests Revert "[SPARK-29644][SQL] Corrected ShortType and ByteType mapping to SmallInt and TinyInt in JDBCUtils 2019-11-18 18:44:16 -08:00
kafka-0-10 [SPARK-21869][SS] Apply Apache Commons Pool to Kafka producer 2019-11-07 17:06:32 -08:00
kafka-0-10-assembly Revert "Prepare Spark release v3.0.0-preview-rc2" 2019-10-30 17:45:44 -07:00
kafka-0-10-sql [SPARK-29957][TEST] Reset MiniKDC's default enctypes to fit jdk8/jdk11 2019-12-05 23:12:45 -08:00
kafka-0-10-token-provider Revert "Prepare Spark release v3.0.0-preview-rc2" 2019-10-30 17:45:44 -07:00
kinesis-asl [MINOR][TESTS] Replace JVM assert with JUnit Assert in tests 2019-11-20 14:04:15 -06:00
kinesis-asl-assembly Revert "Prepare Spark release v3.0.0-preview-rc2" 2019-10-30 17:45:44 -07:00
spark-ganglia-lgpl [SPARK-29674][CORE] Update dropwizard metrics to 4.1.x for JDK 9+ 2019-11-03 15:13:06 -08:00