carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jack...@apache.org
Subject carbondata git commit: [CARBONDATA-2703][Tests] Clear up env after tests
Date Tue, 10 Jul 2018 11:32:01 GMT
Repository: carbondata
Updated Branches:
  refs/heads/master a5039baa3 -> 75126c6ca


[CARBONDATA-2703][Tests] Clear up env after tests

1.reset session parameters after test
2.clean up output after test

This closes #2458


Project: http://git-wip-us.apache.org/repos/asf/carbondata/repo
Commit: http://git-wip-us.apache.org/repos/asf/carbondata/commit/75126c6c
Tree: http://git-wip-us.apache.org/repos/asf/carbondata/tree/75126c6c
Diff: http://git-wip-us.apache.org/repos/asf/carbondata/diff/75126c6c

Branch: refs/heads/master
Commit: 75126c6ca51cb8580998c286f3fe0a071cdfe371
Parents: a5039ba
Author: xuchuanyin <xuchuanyin@hust.edu.cn>
Authored: Fri Jul 6 15:50:58 2018 +0800
Committer: Jacky Li <jacky.likun@qq.com>
Committed: Tue Jul 10 19:31:50 2018 +0800

----------------------------------------------------------------------
 .../carbondata/hadoop/ft/CarbonTableOutputFormatTest.java       | 5 ++++-
 .../segmentreading/TestSegmentReadingForMultiThreading.scala    | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/carbondata/blob/75126c6c/hadoop/src/test/java/org/apache/carbondata/hadoop/ft/CarbonTableOutputFormatTest.java
----------------------------------------------------------------------
diff --git a/hadoop/src/test/java/org/apache/carbondata/hadoop/ft/CarbonTableOutputFormatTest.java
b/hadoop/src/test/java/org/apache/carbondata/hadoop/ft/CarbonTableOutputFormatTest.java
index 99f69c2..aa2a500 100644
--- a/hadoop/src/test/java/org/apache/carbondata/hadoop/ft/CarbonTableOutputFormatTest.java
+++ b/hadoop/src/test/java/org/apache/carbondata/hadoop/ft/CarbonTableOutputFormatTest.java
@@ -99,7 +99,8 @@ public class CarbonTableOutputFormatTest {
 
   private void runJob(String outPath) throws Exception {
     Configuration configuration = new Configuration();
-    configuration.set("mapreduce.cluster.local.dir", new File(outPath + "1").getCanonicalPath());
+    String mrLocalDir = new File(outPath + "1").getCanonicalPath();
+    configuration.set("mapreduce.cluster.local.dir", mrLocalDir);
     Job job = Job.getInstance(configuration);
     job.setJarByClass(CarbonTableOutputFormatTest.class);
     job.setOutputKeyClass(NullWritable.class);
@@ -118,6 +119,8 @@ public class CarbonTableOutputFormatTest {
     job.getConfiguration().set("outpath", outPath);
     job.getConfiguration().set("query.id", String.valueOf(System.nanoTime()));
     job.waitForCompletion(true);
+
+    CarbonUtil.deleteFoldersAndFiles(new File(mrLocalDir));
   }
 
 }

http://git-wip-us.apache.org/repos/asf/carbondata/blob/75126c6c/integration/spark2/src/test/scala/org/apache/carbondata/spark/testsuite/segmentreading/TestSegmentReadingForMultiThreading.scala
----------------------------------------------------------------------
diff --git a/integration/spark2/src/test/scala/org/apache/carbondata/spark/testsuite/segmentreading/TestSegmentReadingForMultiThreading.scala
b/integration/spark2/src/test/scala/org/apache/carbondata/spark/testsuite/segmentreading/TestSegmentReadingForMultiThreading.scala
index e24f8b8..a50b1b1 100644
--- a/integration/spark2/src/test/scala/org/apache/carbondata/spark/testsuite/segmentreading/TestSegmentReadingForMultiThreading.scala
+++ b/integration/spark2/src/test/scala/org/apache/carbondata/spark/testsuite/segmentreading/TestSegmentReadingForMultiThreading.scala
@@ -73,6 +73,6 @@ class TestSegmentReadingForMultiThreading extends QueryTest with BeforeAndAfterA
 
   override def afterAll: Unit = {
     sql("DROP TABLE IF EXISTS carbon_table_MulTI_THread")
-
+    CarbonSession.threadUnset("carbon.input.segments.default.carbon_table_MulTI_THread")
   }
 }


Mime
View raw message