You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by gu...@apache.org on 2021/04/02 06:53:01 UTC

[spark] branch branch-3.0 updated: [SPARK-34940][SQL][TEST] Fix test of BasicWriteTaskStatsTrackerSuite

This is an automated email from the ASF dual-hosted git repository.

gurwls223 pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/branch-3.0 by this push:
     new 58217b8  [SPARK-34940][SQL][TEST] Fix test of BasicWriteTaskStatsTrackerSuite
58217b8 is described below

commit 58217b85d247be3468c5d4b49812366b18ff645e
Author: Cheng Su <ch...@fb.com>
AuthorDate: Fri Apr 2 15:51:22 2021 +0900

    [SPARK-34940][SQL][TEST] Fix test of BasicWriteTaskStatsTrackerSuite
    
    ### What changes were proposed in this pull request?
    
    This is to fix the minor typo in unit test of BasicWriteTaskStatsTrackerSuite (https://github.com/apache/spark/blob/master/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/BasicWriteTaskStatsTrackerSuite.scala#L152 ), where it should be a new file name, e.g. `f-3-3`, because the unit test expects 3 files in statistics (https://github.com/apache/spark/blob/master/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/BasicWriteTaskStatsTrackerSuite.scala#L160 ).
    
    ### Why are the changes needed?
    
    Fix minor bug.
    
    ### Does this PR introduce _any_ user-facing change?
    
    No.
    
    ### How was this patch tested?
    
    Changed unit test `"Three files, last one empty"` itself.
    
    Closes #32034 from c21/tracker-fix.
    
    Authored-by: Cheng Su <ch...@fb.com>
    Signed-off-by: HyukjinKwon <gu...@apache.org>
    (cherry picked from commit 280a2f359c55d8c0563ebbf54a3196ffeb65560e)
    Signed-off-by: HyukjinKwon <gu...@apache.org>
---
 .../sql/execution/datasources/BasicWriteTaskStatsTrackerSuite.scala     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/BasicWriteTaskStatsTrackerSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/BasicWriteTaskStatsTrackerSuite.scala
index 32941d8..5756bed 100644
--- a/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/BasicWriteTaskStatsTrackerSuite.scala
+++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/BasicWriteTaskStatsTrackerSuite.scala
@@ -148,7 +148,7 @@ class BasicWriteTaskStatsTrackerSuite extends SparkFunSuite {
   test("Three files, last one empty") {
     val file1 = new Path(tempDirPath, "f-3-1")
     val file2 = new Path(tempDirPath, "f-3-2")
-    val file3 = new Path(tempDirPath, "f-3-2")
+    val file3 = new Path(tempDirPath, "f-3-3")
     val tracker = new BasicWriteTaskStatsTracker(conf)
     tracker.newFile(file1.toString)
     write1(file1)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org