You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by se...@apache.org on 2015/02/02 02:53:41 UTC
[13/50] [abbrv] incubator-ignite git commit: # ignite-sprint-1.
# ignite-sprint-1.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/bdebb406
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/bdebb406
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/bdebb406
Branch: refs/heads/ignite-sql
Commit: bdebb406d6f58e7c6c4b334f6ea1a8be2b4ad7c8
Parents: 9502c0d
Author: AKuznetsov <ak...@gridgain.com>
Authored: Fri Jan 30 09:38:18 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Fri Jan 30 09:38:18 2015 +0700
----------------------------------------------------------------------
.../visor/commands/gc/VisorGcCommand.scala | 13 ++++------
.../visor/commands/gc/VisorGcCommandSpec.scala | 25 +++++++++++---------
2 files changed, 19 insertions(+), 19 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bdebb406/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/gc/VisorGcCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/gc/VisorGcCommand.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/gc/VisorGcCommand.scala
index ef1a241..713247c 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/gc/VisorGcCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/gc/VisorGcCommand.scala
@@ -17,17 +17,14 @@
package org.apache.ignite.visor.commands.gc
-import org.apache.ignite.internal.visor.node.VisorNodeGcTask
-
import org.apache.ignite._
import org.apache.ignite.cluster.{ClusterGroupEmptyException, ClusterNode}
-
-import java.lang.{Boolean => JavaBoolean}
-import java.util.{UUID, HashSet => JavaHashSet}
-
+import org.apache.ignite.internal.visor.node.VisorNodeGcTask
import org.apache.ignite.visor.VisorTag
import org.apache.ignite.visor.commands.{VisorConsoleCommand, VisorTextTable}
-import visor.visor._
+import org.apache.ignite.visor.visor._
+
+import java.util.UUID
import scala.collection.JavaConversions._
import scala.language.{implicitConversions, reflectiveCalls}
@@ -240,5 +237,5 @@ object VisorGcCommand {
*
* @param vs Visor tagging trait.
*/
- implicit def fromGc2Visor(vs: VisorTag) = cmd
+ implicit def fromGc2Visor(vs: VisorTag): VisorGcCommand = cmd
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bdebb406/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/gc/VisorGcCommandSpec.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/gc/VisorGcCommandSpec.scala b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/gc/VisorGcCommandSpec.scala
index 5e6f1c3..1a59274 100644
--- a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/gc/VisorGcCommandSpec.scala
+++ b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/gc/VisorGcCommandSpec.scala
@@ -17,26 +17,29 @@
package org.apache.ignite.visor.commands.gc
-import org.apache.ignite.visor.visor
-import org.scalatest._
-
+import org.apache.ignite.configuration.IgniteConfiguration
import org.apache.ignite.visor.commands.gc.VisorGcCommand._
-import org.apache.ignite.visor.commands.top.VisorTopologyCommand._
+import org.apache.ignite.visor.{VisorRuntimeBaseSpec, visor}
/**
* Unit test for 'gc' command.
*/
-class VisorGcCommandSpec extends FlatSpec with Matchers with BeforeAndAfterAll {
+class VisorGcCommandSpec extends VisorRuntimeBaseSpec(1) {
behavior of "A 'gc' visor command"
- override def beforeAll() {
- visor.open("-d")
+ /**
+ * Creates grid configuration for provided grid host.
+ *
+ * @param name Grid name.
+ * @return Grid configuration.
+ */
+ override def config(name: String): IgniteConfiguration = {
+ val cfg = new IgniteConfiguration
- visor.top()
- }
+ cfg.setGridName(name)
+ cfg.setLifeCycleEmailNotification(false)
- override def afterAll() {
- visor.close()
+ cfg
}
it should "run GC on all nodes" in {