Skip to content

Commit

Permalink
Fix the IT module depends on the tests module (#4374)
Browse files Browse the repository at this point in the history
* fix the IT module depends on the tests module

Signed-off-by: Chong Gao <res_life@163.com>

* fix mvn test hang

Signed-off-by: Chong Gao <res_life@163.com>
  • Loading branch information
Chong Gao authored Dec 20, 2021
1 parent bc901c3 commit 560351a
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 18 deletions.
16 changes: 0 additions & 16 deletions integration_tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,28 +60,12 @@
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<!-- use aggregator jar because accessing internal classes -->
<dependency>
<groupId>com.nvidia</groupId>
<artifactId>rapids-4-spark-aggregator_${scala.binary.version}</artifactId>
<version>${project.version}</version>
<classifier>${spark.version.classifier}</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.nvidia</groupId>
<artifactId>rapids-4-spark-udf-examples_${scala.binary.version}</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.nvidia</groupId>
<artifactId>rapids-4-spark-tests_${scala.binary.version}</artifactId>
<version>${project.version}</version>
<classifier>${spark.version.classifier}tests</classifier>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-sql_${scala.binary.version}</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
package com.nvidia.spark.rapids.tests.mortgage

import com.nvidia.spark.rapids.ShimLoader
import org.scalatest.FunSuite
import org.scalatest.{BeforeAndAfterAll, FunSuite}

import org.apache.spark.sql.SparkSession
import org.apache.spark.sql.functions._

class MortgageSparkSuite extends FunSuite {
class MortgageSparkSuite extends FunSuite with BeforeAndAfterAll {

/**
* This is intentionally a def rather than a val so that scalatest uses the correct value (from
Expand Down Expand Up @@ -63,6 +63,11 @@ class MortgageSparkSuite extends FunSuite {
builder.getOrCreate()
}

// Close the session to avoid hanging after all cases are completed
override def afterAll() = {
session.close()
}

test("extract mortgage data") {
val df = Run.csv(
session,
Expand Down Expand Up @@ -120,3 +125,4 @@ class MortgageSparkSuite extends FunSuite {
assert(df.count() === 177)
}
}

0 comments on commit 560351a

Please sign in to comment.