-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve integration tests time and stability
- Combine the integration tests into a tests suite - Start the Docker container with Cartridge once per test suite - Update testcontainers to an unreleased version with fixed reusing of the container images
- Loading branch information
Showing
10 changed files
with
178 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,3 +47,8 @@ codereview.rc | |
|
||
# Test Cartridge cluster | ||
.rocks | ||
|
||
# Hive | ||
metastore_db/ | ||
derby.log | ||
spark-warehouse/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
sbt.version=1.6.2 | ||
sbt.version=1.7.0-M3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
sbt.version = 1.5.2 | ||
sbt.version = 1.7.0-M3 |
24 changes: 24 additions & 0 deletions
24
src/test/scala/io/tarantool/spark/connector/integration/IntegrationTests.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package io.tarantool.spark.connector.integration | ||
|
||
import org.apache.spark.sql.SQLImplicits | ||
import org.scalatest._ | ||
|
||
class IntegrationTests | ||
extends Suites( | ||
new TarantoolConnectionSpec, | ||
new TarantoolSparkReadClusterTest, | ||
new TarantoolSparkWriteClusterTest | ||
) | ||
with BeforeAndAfterAll { | ||
protected lazy val sqlImplicits: SQLImplicits = SharedSparkContext.spark.implicits | ||
|
||
override def beforeAll(): Unit = { | ||
super.beforeAll() | ||
SharedSparkContext.setup() | ||
} | ||
|
||
override def afterAll(): Unit = { | ||
super.afterAll() | ||
SharedSparkContext.teardown() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 11 additions & 4 deletions
15
.../connection/TarantoolConnectionSpec.scala → ...integration/TarantoolConnectionSpec.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
src/test/scala/io/tarantool/spark/connector/integration/TarantoolSparkClusterTestSuite.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package io.tarantool.spark.connector.integration | ||
|
||
import org.scalatest.BeforeAndAfterEach | ||
import org.scalatest.Suite | ||
|
||
/** | ||
* @author Alexey Kuzin | ||
*/ | ||
trait TarantoolSparkClusterTestSuite extends BeforeAndAfterEach { this: Suite => | ||
|
||
override protected def beforeEach(): Unit = { | ||
super.beforeEach() | ||
SharedSparkContext.setupSpark() | ||
} | ||
|
||
override protected def afterEach(): Unit = { | ||
super.afterEach() | ||
SharedSparkContext.teardownSpark() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.