# ignite-sql-tests: fixed Visor tests - types should be registered in cache 
IndexedTypes.


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

Branch: refs/heads/ignite-432
Commit: 4df09f2aa28bda95691c6333cd2ef78120951bea
Parents: 78d77bc
Author: AKuznetsov <akuznet...@gridgain.com>
Authored: Mon Mar 16 15:16:15 2015 +0700
Committer: AKuznetsov <akuznet...@gridgain.com>
Committed: Mon Mar 16 15:16:15 2015 +0700

----------------------------------------------------------------------
 .../visor/commands/cache/VisorCacheCommandSpec.scala     | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4df09f2a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommandSpec.scala
----------------------------------------------------------------------
diff --git 
a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommandSpec.scala
 
b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommandSpec.scala
index b850625..59954fe 100644
--- 
a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommandSpec.scala
+++ 
b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommandSpec.scala
@@ -26,6 +26,7 @@ import org.apache.ignite.configuration._
 import org.apache.ignite.spi.discovery.tcp._
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm._
 
+import java.lang.{Integer => JavaInt}
 import org.jetbrains.annotations._
 
 import org.apache.ignite.visor._
@@ -51,6 +52,10 @@ class VisorCacheCommandSpec extends VisorRuntimeBaseSpec(1) {
         cfg.setAtomicityMode(TRANSACTIONAL)
         cfg.setName(name)
 
+        val arr = Seq(classOf[JavaInt], classOf[Foo]).toArray
+
+        cfg.setIndexedTypes(arr:_*)
+
         cfg
     }
 
@@ -93,7 +98,7 @@ class VisorCacheCommandSpec extends VisorRuntimeBaseSpec(1) {
     it should "run query and display information about caches" in {
         val g = Ignition.ignite("node-1")
 
-        val c = g.jcache[Int, Foo]("replicated")
+        val c = g.jcache[JavaInt, Foo]("replicated")
 
         c.put(0, Foo(20))
         c.put(1, Foo(100))
@@ -101,12 +106,12 @@ class VisorCacheCommandSpec extends 
VisorRuntimeBaseSpec(1) {
         c.put(3, Foo(150))
 
         // Create and execute query that mast return 2 rows.
-        val q1 = c.query(new SqlQuery(classOf[Foo], "_key > 
?").setArgs(java.lang.Integer.valueOf(1))).getAll()
+        val q1 = c.query(new SqlQuery(classOf[Foo], "_key > 
?").setArgs(JavaInt.valueOf(1))).getAll()
 
         assert(q1.size() == 2)
 
         // Create and execute query that mast return 0 rows.
-        val q2 = c.query(new SqlQuery(classOf[Foo], "_key > 
?").setArgs(java.lang.Integer.valueOf(100))).getAll()
+        val q2 = c.query(new SqlQuery(classOf[Foo], "_key > 
?").setArgs(JavaInt.valueOf(100))).getAll()
 
         assert(q2.size() == 0)
 

Reply via email to