Repository: ignite
Updated Branches:
  refs/heads/master 1c7b42285 -> f579a750b


IGNITE-7042: Enable scala test plugin for spark and spark_2.10 - Fixes #3530.

Signed-off-by: Nikolay Izhikov <nizhi...@apache.org>


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

Branch: refs/heads/master
Commit: f579a750bafd8f8659a8cf64c84ad62c64485e74
Parents: 1c7b422
Author: Nikolay Izhikov <nizhi...@apache.org>
Authored: Mon Feb 19 18:22:52 2018 +0300
Committer: Nikolay Izhikov <nizhi...@apache.org>
Committed: Mon Feb 19 18:22:52 2018 +0300

----------------------------------------------------------------------
 modules/spark-2.10/pom.xml                      | 24 ++++++++++++++++----
 modules/spark/pom.xml                           | 19 ++++++++++++++++
 .../ignite/spark/AbstractDataFrameSpec.scala    |  2 +-
 .../apache/ignite/spark/IgniteCatalogSpec.scala |  4 +++-
 .../org/apache/ignite/spark/IgniteRDDSpec.scala |  4 ++++
 5 files changed, 47 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/f579a750/modules/spark-2.10/pom.xml
----------------------------------------------------------------------
diff --git a/modules/spark-2.10/pom.xml b/modules/spark-2.10/pom.xml
index c6145c7..791633a 100644
--- a/modules/spark-2.10/pom.xml
+++ b/modules/spark-2.10/pom.xml
@@ -303,10 +303,7 @@
 
         <testResources>
             <testResource>
-                <directory>../spark/src/test/scala</directory>
-                <excludes>
-                    <exclude>**/*.scala</exclude>
-                </excludes>
+                <directory>../spark/src/test/resources</directory>
             </testResource>
         </testResources>
 
@@ -315,6 +312,25 @@
                 <groupId>net.alchim31.maven</groupId>
                 <artifactId>scala-maven-plugin</artifactId>
             </plugin>
+
+            <plugin>
+                <groupId>org.scalatest</groupId>
+                <artifactId>scalatest-maven-plugin</artifactId>
+                <version>1.0</version>
+                <configuration>
+                    
<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
+                    <junitxml>.</junitxml>
+                    <filereports>WDF IgniteScalaTestSuites.txt</filereports>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>test</id>
+                        <goals>
+                            <goal>test</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
         </plugins>
     </build>
 </project>

http://git-wip-us.apache.org/repos/asf/ignite/blob/f579a750/modules/spark/pom.xml
----------------------------------------------------------------------
diff --git a/modules/spark/pom.xml b/modules/spark/pom.xml
index 6648ea9..b1d38a8 100644
--- a/modules/spark/pom.xml
+++ b/modules/spark/pom.xml
@@ -294,6 +294,25 @@
                 <groupId>net.alchim31.maven</groupId>
                 <artifactId>scala-maven-plugin</artifactId>
             </plugin>
+
+            <plugin>
+                <groupId>org.scalatest</groupId>
+                <artifactId>scalatest-maven-plugin</artifactId>
+                <version>1.0</version>
+                <configuration>
+                    
<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
+                    <junitxml>.</junitxml>
+                    <filereports>WDF IgniteScalaTestSuites.txt</filereports>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>test</id>
+                        <goals>
+                            <goal>test</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
         </plugins>
     </build>
 </project>

http://git-wip-us.apache.org/repos/asf/ignite/blob/f579a750/modules/spark/src/test/scala/org/apache/ignite/spark/AbstractDataFrameSpec.scala
----------------------------------------------------------------------
diff --git 
a/modules/spark/src/test/scala/org/apache/ignite/spark/AbstractDataFrameSpec.scala
 
b/modules/spark/src/test/scala/org/apache/ignite/spark/AbstractDataFrameSpec.scala
index 263f235..8613592 100644
--- 
a/modules/spark/src/test/scala/org/apache/ignite/spark/AbstractDataFrameSpec.scala
+++ 
b/modules/spark/src/test/scala/org/apache/ignite/spark/AbstractDataFrameSpec.scala
@@ -122,7 +122,7 @@ abstract class AbstractDataFrameSpec extends FunSpec with 
Matchers with BeforeAn
 }
 
 object AbstractDataFrameSpec {
-    val TEST_CONFIG_FILE = "src/test/resources/ignite-spark-config.xml"
+    val TEST_CONFIG_FILE = 
"modules/spark/src/test/resources/ignite-spark-config.xml"
 
     val DEFAULT_CACHE = "cache1"
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/f579a750/modules/spark/src/test/scala/org/apache/ignite/spark/IgniteCatalogSpec.scala
----------------------------------------------------------------------
diff --git 
a/modules/spark/src/test/scala/org/apache/ignite/spark/IgniteCatalogSpec.scala 
b/modules/spark/src/test/scala/org/apache/ignite/spark/IgniteCatalogSpec.scala
index 23cfffd..6077211 100644
--- 
a/modules/spark/src/test/scala/org/apache/ignite/spark/IgniteCatalogSpec.scala
+++ 
b/modules/spark/src/test/scala/org/apache/ignite/spark/IgniteCatalogSpec.scala
@@ -21,6 +21,7 @@ import java.lang.{Long ⇒ JLong}
 
 import org.apache.ignite.cache.query.SqlFieldsQuery
 import org.apache.ignite.internal.IgnitionEx
+import org.apache.ignite.internal.util.IgniteUtils.resolveIgnitePath
 import org.apache.ignite.spark.AbstractDataFrameSpec.{DEFAULT_CACHE, 
EMPLOYEE_CACHE_NAME, TEST_CONFIG_FILE, enclose}
 import org.apache.spark.sql.ignite.IgniteSparkSession
 import org.apache.spark.sql.types.{LongType, StringType}
@@ -105,7 +106,8 @@ class IgniteCatalogSpec extends AbstractDataFrameSpec {
         }
 
         it("Should allow register tables based on other datasources") {
-            val citiesDataFrame = 
igniteSession.read.json("src/test/resources/cities.json")
+            val citiesDataFrame = igniteSession.read.json(
+                
resolveIgnitePath("modules/spark/src/test/resources/cities.json").getAbsolutePath)
 
             citiesDataFrame.createOrReplaceTempView("JSON_CITIES")
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/f579a750/modules/spark/src/test/scala/org/apache/ignite/spark/IgniteRDDSpec.scala
----------------------------------------------------------------------
diff --git 
a/modules/spark/src/test/scala/org/apache/ignite/spark/IgniteRDDSpec.scala 
b/modules/spark/src/test/scala/org/apache/ignite/spark/IgniteRDDSpec.scala
index 5f05f7a..097a627 100644
--- a/modules/spark/src/test/scala/org/apache/ignite/spark/IgniteRDDSpec.scala
+++ b/modules/spark/src/test/scala/org/apache/ignite/spark/IgniteRDDSpec.scala
@@ -91,6 +91,8 @@ class IgniteRDDSpec extends FunSpec with Matchers with 
BeforeAndAfterAll with Be
         }
 
         it("should successfully store data to ignite using saveValues") {
+            fail("https://issues.apache.org/jira/browse/IGNITE-7727";)
+
             val sc = new SparkContext("local[*]", "test")
 
             try {
@@ -114,6 +116,8 @@ class IgniteRDDSpec extends FunSpec with Matchers with 
BeforeAndAfterAll with Be
         }
 
         it("should successfully store data to ignite using saveValues with 
inline transformation") {
+            fail("https://issues.apache.org/jira/browse/IGNITE-7727";)
+
             val sc = new SparkContext("local[*]", "test")
 
             try {

Reply via email to