Return-Path: X-Original-To: apmail-ignite-commits-archive@minotaur.apache.org Delivered-To: apmail-ignite-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EA59F17ADE for ; Sat, 16 May 2015 07:09:04 +0000 (UTC) Received: (qmail 47237 invoked by uid 500); 16 May 2015 07:09:04 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 47205 invoked by uid 500); 16 May 2015 07:09:04 -0000 Mailing-List: contact commits-help@ignite.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.incubator.apache.org Delivered-To: mailing list commits@ignite.incubator.apache.org Received: (qmail 47196 invoked by uid 99); 16 May 2015 07:09:04 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 16 May 2015 07:09:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 410011A2D70 for ; Sat, 16 May 2015 07:09:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.77 X-Spam-Level: * X-Spam-Status: No, score=1.77 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id OA4U-xC92uYU for ; Sat, 16 May 2015 07:08:54 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with SMTP id 699D2212C8 for ; Sat, 16 May 2015 07:08:52 +0000 (UTC) Received: (qmail 45127 invoked by uid 99); 16 May 2015 07:07:36 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 16 May 2015 07:07:36 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 861E1E02A2; Sat, 16 May 2015 07:07:36 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sboikov@apache.org To: commits@ignite.incubator.apache.org Date: Sat, 16 May 2015 07:07:36 -0000 Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: [1/8] incubator-ignite git commit: Revert "ignite-471: fixed NPE in PortableMarshaller" Repository: incubator-ignite Updated Branches: refs/heads/ignite-471 477dea6f4 -> 8a6dd007d http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a6dd007/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/VisorArgListSpec.scala ---------------------------------------------------------------------- diff --git a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/VisorArgListSpec.scala b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/VisorArgListSpec.scala index a581899..8b71918 100644 --- a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/VisorArgListSpec.scala +++ b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/VisorArgListSpec.scala @@ -25,48 +25,48 @@ import visor._ /** * Test for visor's argument list parsing. */ -class VisorArgListSpec extends FunSpec with ShouldMatchers { - describe("A visor argument list") { - it("should properly parse 'null' arguments") { - val v = parseArgs(null) +class VisorArgListSpec extends FlatSpec with ShouldMatchers { + behavior of "A visor argument list" - assert(v.isEmpty) - } + it should "properly parse 'null' arguments" in { + val v = parseArgs(null) - it("should properly parse non-empty arguments") { - val v = parseArgs("-a=b c d -minus -d=") + assert(v.isEmpty) + } + + it should "properly parse non-empty arguments" in { + val v = parseArgs("-a=b c d -minus -d=") - assert(v.size == 5) + assert(v.size == 5) - assert(v(0)._1 == "a") - assert(v(0)._2 == "b") + assert(v(0)._1 == "a") + assert(v(0)._2 == "b") - assert(v(1)._1 == null) - assert(v(1)._2 == "c") + assert(v(1)._1 == null) + assert(v(1)._2 == "c") - assert(v(2)._1 == null) - assert(v(2)._2 == "d") + assert(v(2)._1 == null) + assert(v(2)._2 == "d") - assert(v(3)._1 == "minus") - assert(v(3)._2 == null) + assert(v(3)._1 == "minus") + assert(v(3)._2 == null) - assert(v(4)._1 == "d") - assert(v(4)._2 == "") - } + assert(v(4)._1 == "d") + assert(v(4)._2 == "") + } - it("should properly parse quoted arguments") { - val v = parseArgs("-a='b 'c' d' -minus -d=") + it should "properly parse quoted arguments" in { + val v = parseArgs("-a='b 'c' d' -minus -d=") - assert(v.size == 3) + assert(v.size == 3) - assert(v(0)._1 == "a") - assert(v(0)._2 == "b 'c' d") + assert(v(0)._1 == "a") + assert(v(0)._2 == "b 'c' d") - assert(v(1)._1 == "minus") - assert(v(1)._2 == null) + assert(v(1)._1 == "minus") + assert(v(1)._2 == null) - assert(v(2)._1 == "d") - assert(v(2)._2 == "") - } + assert(v(2)._1 == "d") + assert(v(2)._2 == "") } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a6dd007/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/VisorFileNameCompleterSpec.scala ---------------------------------------------------------------------- diff --git a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/VisorFileNameCompleterSpec.scala b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/VisorFileNameCompleterSpec.scala index e7333c6..9767fc4 100644 --- a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/VisorFileNameCompleterSpec.scala +++ b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/VisorFileNameCompleterSpec.scala @@ -25,34 +25,34 @@ import java.util /** * Test for visor's file name completer. */ -class VisorFileNameCompleterSpec extends FunSpec with ShouldMatchers { - describe("A visor file name completer") { - it("should properly parse empty path") { - val c = new VisorFileNameCompleter() +class VisorFileNameCompleterSpec extends FlatSpec with ShouldMatchers { + behavior of "A visor file name completer" - val res = new util.ArrayList[CharSequence]() + it should "properly parse empty path" in { + val c = new VisorFileNameCompleter() - c.complete("", 0, res) + val res = new util.ArrayList[CharSequence]() - assertResult(new File("").getAbsoluteFile.listFiles().length)(res.size) + c.complete("", 0, res) - res.clear() + assertResult(new File("").getAbsoluteFile.listFiles().length)(res.size) - c.complete(null, 0, res) + res.clear() - assertResult(new File("").getAbsoluteFile.listFiles().length)(res.size) + c.complete(null, 0, res) - res.clear() + assertResult(new File("").getAbsoluteFile.listFiles().length)(res.size) - c.complete(" ", 2, res) + res.clear() - assertResult(new File("").getAbsoluteFile.listFiles().length)(res.size) + c.complete(" ", 2, res) - res.clear() + assertResult(new File("").getAbsoluteFile.listFiles().length)(res.size) - c.complete("help ", 5, res) + res.clear() - assertResult(new File("").getAbsoluteFile.listFiles().length)(res.size) - } + c.complete("help ", 5, res) + + assertResult(new File("").getAbsoluteFile.listFiles().length)(res.size) } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a6dd007/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/ack/VisorAckCommandSpec.scala ---------------------------------------------------------------------- diff --git a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/ack/VisorAckCommandSpec.scala b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/ack/VisorAckCommandSpec.scala index b6a9608..6c6c829 100644 --- a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/ack/VisorAckCommandSpec.scala +++ b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/ack/VisorAckCommandSpec.scala @@ -24,17 +24,17 @@ import org.apache.ignite.visor.commands.ack.VisorAckCommand._ * Unit test for 'ack' command. */ class VisorAckCommandSpec extends VisorRuntimeBaseSpec(2) { - describe("A 'ack' visor command") { - it("should properly execute w/o arguments"){ - visor ack() - } + behavior of "A 'ack' visor command" - it("should properly execute with arguments") { - visor ack "Broadcasting!" - } + it should "properly execute w/o arguments" in { + visor ack() + } + + it should "properly execute with arguments" in { + visor ack "Broadcasting!" + } - it("should print error message when not connected") { - visor ack() - } + it should "print error message when not connected" in { + visor ack() } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a6dd007/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/alert/VisorAlertCommandSpec.scala ---------------------------------------------------------------------- diff --git a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/alert/VisorAlertCommandSpec.scala b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/alert/VisorAlertCommandSpec.scala index ec7d1b5..0a3a011 100644 --- a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/alert/VisorAlertCommandSpec.scala +++ b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/alert/VisorAlertCommandSpec.scala @@ -100,54 +100,54 @@ class VisorAlertCommandSpec extends VisorRuntimeBaseSpec(1) { } } - describe("An 'alert' visor command") { - it("should print not connected error message") { - visor.close() + behavior of "An 'alert' visor command" - checkOut(visor.alert("-r -t=5 -cc=gte4"), "Visor is disconnected.") + it should "print not connected error message" in { + visor.close() - checkOut(visor.alert(), "No alerts are registered.") - } + checkOut(visor.alert("-r -t=5 -cc=gte4"), "Visor is disconnected.") + + checkOut(visor.alert(), "No alerts are registered.") + } - it("should register new alert") { - try { - checkOut(visor.alert(), "No alerts are registered.") + it should "register new alert" in { + try { + checkOut(visor.alert(), "No alerts are registered.") - matchOut(visor.alert("-r -t=5 -cc=gte4"), "Alert.+registered.") + matchOut(visor.alert("-r -t=5 -cc=gte4"), "Alert.+registered.") - checkOut(visor.alert(), "No alerts are registered.", false) - } - finally { - visor.alert("-u -a") - } + checkOut(visor.alert(), "No alerts are registered.", false) + } + finally { + visor.alert("-u -a") } + } - it("should print error messages on incorrect alerts") { - try { - matchOut(visor.alert("-r -t=5"), "Alert.+registered.") + it should "print error messages on incorrect alerts" in { + try { + matchOut(visor.alert("-r -t=5"), "Alert.+registered.") - checkOut(visor.alert("-r -UNKNOWN_KEY=lt20"), "Invalid argument") + checkOut(visor.alert("-r -UNKNOWN_KEY=lt20"), "Invalid argument") - checkOut(visor.alert("-r -cc=UNKNOWN_OPERATION20"), "Invalid expression") - } - finally { - visor.alert("-u -a") - } + checkOut(visor.alert("-r -cc=UNKNOWN_OPERATION20"), "Invalid expression") + } + finally { + visor.alert("-u -a") } + } - it("should write alert to log") { - try { - matchOut(visor.alert("-r -nc=gte1"), "Alert.+registered.") + it should "write alert to log" in { + try { + matchOut(visor.alert("-r -nc=gte1"), "Alert.+registered.") - Ignition.start(config("node-2")) + Ignition.start(config("node-2")) - Ignition.stop("node-2", false) + Ignition.stop("node-2", false) - checkOut(visor.alert(), "No alerts are registered.", false) - } - finally { - visor.alert("-u -a") - } + checkOut(visor.alert(), "No alerts are registered.", false) + } + finally { + visor.alert("-u -a") } } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a6dd007/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/cache/VisorCacheClearCommandSpec.scala ---------------------------------------------------------------------- diff --git a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/cache/VisorCacheClearCommandSpec.scala b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/cache/VisorCacheClearCommandSpec.scala index 6bb4993..2e51698 100644 --- a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/cache/VisorCacheClearCommandSpec.scala +++ b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/cache/VisorCacheClearCommandSpec.scala @@ -75,43 +75,43 @@ class VisorCacheClearCommandSpec extends VisorRuntimeBaseSpec(2) { cfg } - describe("An 'cclear' visor command") { - it("should show correct result for default cache") { - Ignition.ignite("node-1").cache[Int, Int](null).putAll(Map(1 -> 1, 2 -> 2, 3 -> 3)) + behavior of "An 'cclear' visor command" - val lock = Ignition.ignite("node-1").cache[Int, Int](null).lock(1) + it should "show correct result for default cache" in { + Ignition.ignite("node-1").cache[Int, Int](null).putAll(Map(1 -> 1, 2 -> 2, 3 -> 3)) - lock.lock() + val lock = Ignition.ignite("node-1").cache[Int, Int](null).lock(1) - VisorCacheClearCommand().clear(Nil, None) + lock.lock() - lock.unlock() + VisorCacheClearCommand().clear(Nil, None) - VisorCacheClearCommand().clear(Nil, None) - } + lock.unlock() - it("should show correct result for named cache") { - Ignition.ignite("node-1").cache[Int, Int]("cache").putAll(Map(1 -> 1, 2 -> 2, 3 -> 3)) + VisorCacheClearCommand().clear(Nil, None) + } + + it should "show correct result for named cache" in { + Ignition.ignite("node-1").cache[Int, Int]("cache").putAll(Map(1 -> 1, 2 -> 2, 3 -> 3)) - val lock = Ignition.ignite("node-1").cache[Int, Int]("cache").lock(1) + val lock = Ignition.ignite("node-1").cache[Int, Int]("cache").lock(1) - lock.lock() + lock.lock() - visor.cache("-clear -c=cache") + visor.cache("-clear -c=cache") - lock.unlock() + lock.unlock() - visor.cache("-clear -c=cache") - } + visor.cache("-clear -c=cache") + } - it("should show correct help") { - VisorCacheCommand + it should "show correct help" in { + VisorCacheCommand - visor.help("cache") - } + visor.help("cache") + } - it("should show empty projection error message") { - visor.cache("-clear -c=wrong") - } + it should "show empty projection error message" in { + visor.cache("-clear -c=wrong") } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a6dd007/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 4859a8f..4724006 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 @@ -36,6 +36,7 @@ import org.apache.ignite.visor.commands.cache.VisorCacheCommand._ * Unit test for 'events' command. */ class VisorCacheCommandSpec extends VisorRuntimeBaseSpec(1) { + behavior of "A 'cache' visor command" /** IP finder. */ val ipFinder = new TcpDiscoveryVmIpFinder(true) @@ -53,7 +54,7 @@ class VisorCacheCommandSpec extends VisorRuntimeBaseSpec(1) { val arr = Seq(classOf[JavaInt], classOf[Foo]).toArray - cfg.setIndexedTypes(arr: _*) + cfg.setIndexedTypes(arr:_*) cfg } @@ -64,8 +65,7 @@ class VisorCacheCommandSpec extends VisorRuntimeBaseSpec(1) { * @param name Grid name. * @return Grid configuration. */ - override def config(name: String): IgniteConfiguration = - { + override def config(name: String): IgniteConfiguration = { val cfg = new IgniteConfiguration cfg.setGridName(name) @@ -81,51 +81,49 @@ class VisorCacheCommandSpec extends VisorRuntimeBaseSpec(1) { cfg } - describe("A 'cache' visor command") { - it("should put/get some values to/from cache and display information about caches") { - val c = Ignition.ignite("node-1").cache[String, String]("replicated") + it should "put/get some values to/from cache and display information about caches" in { + val c = Ignition.ignite("node-1").cache[String, String]("replicated") - for (i <- 0 to 3) { - val kv = "" + i + for (i <- 0 to 3) { + val kv = "" + i - c.put(kv, kv) + c.put(kv, kv) - c.get(kv) - } - - visor.cache() + c.get(kv) } - it("should run query and display information about caches") { - val g = Ignition.ignite("node-1") + visor.cache() + } - val c = g.cache[JavaInt, Foo]("replicated") + it should "run query and display information about caches" in { + val g = Ignition.ignite("node-1") - c.put(0, Foo(20)) - c.put(1, Foo(100)) - c.put(2, Foo(101)) - c.put(3, Foo(150)) + val c = g.cache[JavaInt, Foo]("replicated") - // Create and execute query that mast return 2 rows. - val q1 = c.query(new SqlQuery(classOf[Foo], "_key > ?").setArgs(JavaInt.valueOf(1))).getAll + c.put(0, Foo(20)) + c.put(1, Foo(100)) + c.put(2, Foo(101)) + c.put(3, Foo(150)) - assert(q1.size() == 2) + // Create and execute query that mast return 2 rows. + val q1 = c.query(new SqlQuery(classOf[Foo], "_key > ?").setArgs(JavaInt.valueOf(1))).getAll() - // Create and execute query that mast return 0 rows. - val q2 = c.query(new SqlQuery(classOf[Foo], "_key > ?").setArgs(JavaInt.valueOf(100))).getAll + assert(q1.size() == 2) - assert(q2.size() == 0) + // Create and execute query that mast return 0 rows. + val q2 = c.query(new SqlQuery(classOf[Foo], "_key > ?").setArgs(JavaInt.valueOf(100))).getAll() - visor cache "-a" - } + assert(q2.size() == 0) - it("should display correct information for 'replicated' cache only") { - visor cache "-n=replicated -a" - } + visor cache "-a" + } - it("should display correct information for all caches") { - visor cache "-a" - } + it should "display correct information for 'replicated' cache only" in { + visor cache "-n=replicated -a" + } + + it should "display correct information for all caches" in { + visor cache "-a" } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a6dd007/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/config/VisorConfigurationCommandSpec.scala ---------------------------------------------------------------------- diff --git a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/config/VisorConfigurationCommandSpec.scala b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/config/VisorConfigurationCommandSpec.scala index 72642f7..6b1b62d 100644 --- a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/config/VisorConfigurationCommandSpec.scala +++ b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/config/VisorConfigurationCommandSpec.scala @@ -42,9 +42,9 @@ class VisorConfigurationCommandSpec extends VisorRuntimeBaseSpec(1) { cfg } - describe("A 'config' visor command") { - it("should print configuration for first node") { - visor.config("-id8=@n0") - } + behavior of "A 'config' visor command" + + it should "print configuration for first node" in { + visor.config("-id8=@n0") } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a6dd007/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/cswap/VisorCacheSwapCommandSpec.scala ---------------------------------------------------------------------- diff --git a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/cswap/VisorCacheSwapCommandSpec.scala b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/cswap/VisorCacheSwapCommandSpec.scala index 8a0b0c8..f5af1d3 100644 --- a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/cswap/VisorCacheSwapCommandSpec.scala +++ b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/cswap/VisorCacheSwapCommandSpec.scala @@ -69,21 +69,21 @@ class VisorCacheSwapCommandSpec extends VisorRuntimeBaseSpec(2) { cfg } - describe("An 'cswap' visor command") { - it("should show correct result for default cache") { - Ignition.ignite("node-1").cache[Int, Int](null).putAll(Map(1 -> 1, 2 -> 2, 3 -> 3)) + behavior of "An 'cswap' visor command" - visor.cache("-swap -c=") - } + it should "show correct result for default cache" in { + Ignition.ignite("node-1").cache[Int, Int](null).putAll(Map(1 -> 1, 2 -> 2, 3 -> 3)) - it("should show correct result for named cache") { - Ignition.ignite("node-1").cache[Int, Int]("cache").putAll(Map(1 -> 1, 2 -> 2, 3 -> 3)) + visor.cache("-swap -c=") + } + + it should "show correct result for named cache" in { + Ignition.ignite("node-1").cache[Int, Int]("cache").putAll(Map(1 -> 1, 2 -> 2, 3 -> 3)) - visor.cache("-swap -c=cache") - } + visor.cache("-swap -c=cache") + } - it("should show empty projection error message") { - visor.cache("-swap -c=wrong") - } + it should "show empty projection error message" in { + visor.cache("-swap -c=wrong") } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a6dd007/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/deploy/VisorDeployCommandSpec.scala ---------------------------------------------------------------------- diff --git a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/deploy/VisorDeployCommandSpec.scala b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/deploy/VisorDeployCommandSpec.scala index b80ff1d..6003119 100644 --- a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/deploy/VisorDeployCommandSpec.scala +++ b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/deploy/VisorDeployCommandSpec.scala @@ -25,10 +25,10 @@ import org.apache.ignite.visor.commands.deploy.VisorDeployCommand._ /** * Unit test for 'deploy' command. */ -class VisorDeployCommandSpec extends FunSpec with Matchers { - describe("A 'deploy' visor command") { - it("should copy folder") { - visor.deploy("-h=uname:passwd@localhost -s=/home/uname/test -d=dir") - } +class VisorDeployCommandSpec extends FlatSpec with Matchers { + behavior of "A 'deploy' visor command" + + it should "copy folder" in { + visor.deploy("-h=uname:passwd@localhost -s=/home/uname/test -d=dir") } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a6dd007/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/disco/VisorDiscoveryCommandSpec.scala ---------------------------------------------------------------------- diff --git a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/disco/VisorDiscoveryCommandSpec.scala b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/disco/VisorDiscoveryCommandSpec.scala index 335a048..64f0e0f 100644 --- a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/disco/VisorDiscoveryCommandSpec.scala +++ b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/disco/VisorDiscoveryCommandSpec.scala @@ -51,35 +51,35 @@ class VisorDiscoveryCommandSpec extends VisorRuntimeBaseSpec(4) { cfg } - describe("A 'disco' visor command") { - it("should advise to connect") { - closeVisorQuiet() + behavior of "A 'disco' visor command" - visor.disco() - } + it should "advise to connect" in { + closeVisorQuiet() - it("should show all discovery events") { - visor.disco() - } + visor.disco() + } - it("should show all discovery events in reversed order") { - visor.disco("-r") - } + it should "show all discovery events" in { + visor.disco() + } - it("should show discovery events from last two minutes") { - visor.disco("-t=2m") - } + it should "show all discovery events in reversed order" in { + visor.disco("-r") + } - it("should show discovery events from last two minutes in reversed order ") { - visor.disco("-t=2m -r") - } + it should "show discovery events from last two minutes" in { + visor.disco("-t=2m") + } - it("should show top 3 discovery events") { - visor.disco("-c=3") - } + it should "show discovery events from last two minutes in reversed order " in { + visor.disco("-t=2m -r") + } + + it should "show top 3 discovery events" in { + visor.disco("-c=3") + } - it("should print error message with invalid count") { - visor.disco("-c=x") - } + it should "print error message with invalid count" in { + visor.disco("-c=x") } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a6dd007/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/events/VisorEventsCommandSpec.scala ---------------------------------------------------------------------- diff --git a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/events/VisorEventsCommandSpec.scala b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/events/VisorEventsCommandSpec.scala index 5b18590..365032e 100644 --- a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/events/VisorEventsCommandSpec.scala +++ b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/events/VisorEventsCommandSpec.scala @@ -40,23 +40,23 @@ class VisorEventsCommandSpec extends VisorRuntimeBaseSpec(1) { cfg } - describe("A 'events' visor command") { - it("should print error message when not connected") { - closeVisorQuiet() + behavior of "A 'events' visor command" - visor.events() - } + it should "print error message when not connected" in { + closeVisorQuiet() - it("should display all events from remote node") { - visor.events("-id8=@n0") - } + visor.events() + } + + it should "display all events from remote node" in { + visor.events("-id8=@n0") + } - it("should display top 3 events from remote node") { - visor.events("-id8=@n0 -c=3") - } + it should "display top 3 events from remote node" in { + visor.events("-id8=@n0 -c=3") + } - it("should print error message with invalid count") { - visor.events("-id8=@n0 -c=x") - } + it should "print error message with invalid count" in { + visor.events("-id8=@n0 -c=x") } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a6dd007/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 b467687..678aaf4 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 @@ -25,14 +25,15 @@ import org.apache.ignite.visor.{VisorRuntimeBaseSpec, visor} * Unit test for 'gc' command. */ class VisorGcCommandSpec extends VisorRuntimeBaseSpec(1) { + behavior of "A 'gc' visor command" + /** * Creates grid configuration for provided grid host. * * @param name Grid name. * @return Grid configuration. */ - override def config(name: String): IgniteConfiguration = - { + override def config(name: String): IgniteConfiguration = { val cfg = new IgniteConfiguration cfg.setGridName(name) @@ -40,22 +41,19 @@ class VisorGcCommandSpec extends VisorRuntimeBaseSpec(1) { cfg } - describe("'gc' visor command") { - it("should run GC on all nodes") { - visor.gc() - } - - it("should run GC on first node") { - visor.gc("-id8=@n0") - } + it should "run GC on all nodes" in { + visor.gc() + } - it("should run GC and DGC on all nodes") { - visor.gc("-c") - } + it should "run GC on first node" in { + visor.gc("-id8=@n0") + } - it("should run GC and DGC on first node") { - visor.gc("-id8=@n0 -c") - } + it should "run GC and DGC on all nodes" in { + visor.gc("-c") + } + it should "run GC and DGC on first node" in { + visor.gc("-id8=@n0 -c") } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a6dd007/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/help/VisorHelpCommandSpec.scala ---------------------------------------------------------------------- diff --git a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/help/VisorHelpCommandSpec.scala b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/help/VisorHelpCommandSpec.scala index 43c6f52..b97cb85 100644 --- a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/help/VisorHelpCommandSpec.scala +++ b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/help/VisorHelpCommandSpec.scala @@ -23,7 +23,7 @@ import org.scalatest._ /** * Unit test for 'help' command. */ -class VisorHelpCommandSpec extends FunSpec with Matchers { +class VisorHelpCommandSpec extends FlatSpec with Matchers { // Pre-initialize command so that help can be registered. commands.ack.VisorAckCommand commands.ping.VisorPingCommand @@ -40,34 +40,29 @@ class VisorHelpCommandSpec extends FunSpec with Matchers { commands.deploy.VisorDeployCommand commands.start.VisorStartCommand - - describe("General help") { - it ("should properly execute via alias") { visor.searchCmd("?").get.emptyArgs } - it ("should properly execute w/o alias") { visor.searchCmd("help").get.emptyArgs } - } - - describe("Help for command") { - it ("should properly execute for 'start' command") { visor.help("start") } - it ("should properly execute for 'deploy' command") { visor.help("deploy") } - it ("should properly execute for 'events' command") { visor.help("events") } - it ("should properly execute for 'mclear' command") { visor.help("mclear") } - it ("should properly execute for 'cache' command") { visor.help("cache") } - it ("should properly execute for 'disco' command") { visor.help("disco") } - it ("should properly execute for 'alert' command") { visor.help("alert") } - it ("should properly execute for 'node' command") { visor.help("node") } - it ("should properly execute for 'vvm' command") { visor.help("vvm") } - it ("should properly execute for 'kill' command") { visor.help("kill") } - it ("should properly execute for 'top' command") { visor.help("top") } - it ("should properly execute for 'config' command") { visor.help("config") } - it ("should properly execute for 'ack' command") { visor.help("ack") } - it ("should properly execute for 'ping' command") { visor.help("ping") } - it ("should properly execute for 'close' command") { visor.help("close") } - it ("should properly execute for 'open' command") { visor.help("open") } - it ("should properly execute for 'start' status") { visor.help("status") } - it ("should properly execute for 'start' mset") { visor.help("mset") } - it ("should properly execute for 'start' mget") { visor.help("mget") } - it ("should properly execute for 'start' mlist") { visor.help("mlist") } - it ("should properly execute for 'start' log") { visor.help("log") } - it ("should properly execute for 'start' dash") { visor.help("dash") } - } + "General help" should "properly execute via alias" in { visor.help() } + "General help" should "properly execute w/o alias" in { visor.help() } + "Help for 'start' command" should "properly execute" in { visor.help("start") } + "Help for 'deploy' command" should "properly execute" in { visor.help("deploy") } + "Help for 'events' command" should "properly execute" in { visor.help("events") } + "Help for 'mclear' command" should "properly execute" in { visor.help("mclear") } + "Help for 'cache' command" should "properly execute" in { visor.help("cache") } + "Help for 'disco' command" should "properly execute" in { visor.help("disco") } + "Help for 'alert' command" should "properly execute" in { visor.help("alert") } + "Help for 'node' command" should "properly execute" in { visor.help("node") } + "Help for 'vvm' command" should "properly execute" in { visor.help("vvm") } + "Help for 'kill' command" should "properly execute" in { visor.help("kill") } + "Help for 'top' command" should "properly execute" in { visor.help("top") } + "Help for 'config' command" should "properly execute" in { visor.help("config") } + "Help for 'ack' command" should "properly execute" in { visor.help("ack") } + "Help for 'ping' command" should "properly execute" in { visor.help("ping") } + "Help for 'close' command" should "properly execute" in { visor.help("close") } + "Help for 'open' command" should "properly execute" in { visor.help("open") } + "Help for 'status' command" should "properly execute" in { visor.help("status") } + "Help for 'mset' command" should "properly execute" in { visor.help("mset") } + "Help for 'mget' command" should "properly execute" in { visor.help("mget") } + "Help for 'mlist' command" should "properly execute" in { visor.help("mlist") } + "Help for 'help' command" should "properly execute" in { visor.help("help") } + "Help for 'log' command" should "properly execute" in { visor.help("log") } + "Help for 'dash' command" should "properly execute" in { visor.help("dash") } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a6dd007/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/kill/VisorKillCommandSpec.scala ---------------------------------------------------------------------- diff --git a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/kill/VisorKillCommandSpec.scala b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/kill/VisorKillCommandSpec.scala index 2c659b5..43ef313 100644 --- a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/kill/VisorKillCommandSpec.scala +++ b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/kill/VisorKillCommandSpec.scala @@ -25,34 +25,34 @@ import org.apache.ignite.visor.commands.kill.VisorKillCommand._ /** * Unit test for 'kill' command. */ -class VisorKillCommandSpec extends FunSpec with Matchers { - describe("A 'kill' visor command") { - it("should print error message with null argument") { - visor.open("-d") - visor.kill(null) - visor.close() - } - - it("should print error message if both kill and restart specified") { - visor.open("-d") - visor.kill("-k -r") - visor.close() - } - - it("should print error message if not connected") { - visor.kill("-k") - } - - it("should restart node") { - visor.open("-d") - visor.kill("-r -id8=@n1") - visor.close() - } - - it("should print error message") { - visor.open("-d") - visor.kill("-r -id=xxx") - visor.close() - } +class VisorKillCommandSpec extends FlatSpec with Matchers { + behavior of "A 'kill' visor command" + + it should "print error message with null argument" in { + visor.open("-d") + visor.kill(null) + visor.close() + } + + it should "print error message if both kill and restart specified" in { + visor.open("-d") + visor.kill("-k -r") + visor.close() + } + + it should "print error message if not connected" in { + visor.kill("-k") + } + + it should "restart node" in { + visor.open("-d") + visor.kill("-r -id8=@n1") + visor.close() + } + + it should "print error message" in { + visor.open("-d") + visor.kill("-r -id=xxx") + visor.close() } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a6dd007/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/log/VisorLogCommandSpec.scala ---------------------------------------------------------------------- diff --git a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/log/VisorLogCommandSpec.scala b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/log/VisorLogCommandSpec.scala index ddb84ea..dcf7aae 100644 --- a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/log/VisorLogCommandSpec.scala +++ b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/log/VisorLogCommandSpec.scala @@ -23,10 +23,10 @@ import org.scalatest._ /** * Unit test for 'log' command. */ -class VisorLogCommandSpec extends FunSpec with Matchers { - describe("A 'log' visor command") { - it("should print log status") { - visor.log() - } +class VisorLogCommandSpec extends FlatSpec with Matchers { + behavior of "A 'log' visor command" + + it should "print log status" in { + visor.log() } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a6dd007/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/mem/VisorMemoryCommandSpec.scala ---------------------------------------------------------------------- diff --git a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/mem/VisorMemoryCommandSpec.scala b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/mem/VisorMemoryCommandSpec.scala index 27eaa94..744d93b 100644 --- a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/mem/VisorMemoryCommandSpec.scala +++ b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/mem/VisorMemoryCommandSpec.scala @@ -23,60 +23,53 @@ import org.scalatest._ /** * Unit test for memory commands. */ -class VisorMemoryCommandSpec extends FunSpec with Matchers { - describe("A 'mget' visor command") { - it("should get correct value") { - visor.mset("key", "value") +class VisorMemoryCommandSpec extends FlatSpec with Matchers { + "A 'mget' visor command" should "get correct value" in { + visor.mset("key", "value") - assertResult(Option("value"))(visor.mgetOpt("key")) + assertResult(Option("value"))(visor.mgetOpt("key")) - visor.mclear() - } + visor.mclear() } - describe("A 'mlist' visor command") { - it("should list all variables") { - visor.mset("key1", "value1") - visor.mset("key2", "value2") - visor.mset("key3", "value3") + "A 'mlist' visor command" should "list all variables" in { + visor.mset("key1", "value1") + visor.mset("key2", "value2") + visor.mset("key3", "value3") - visor.mlist() - visor.mclear() - } + visor.mlist() + visor.mclear() + } - it("should list ax and cx variables") { - visor.mset("a1", "1") - visor.mset("a2", "2") - visor.mset("b1", "3") - visor.mset("b2", "4") - visor.mset("c1", "5") - visor.mset("c2", "6") + "A 'mlist' visor command" should "list ax and cx variables" in { + visor.mset("a1", "1") + visor.mset("a2", "2") + visor.mset("b1", "3") + visor.mset("b2", "4") + visor.mset("c1", "5") + visor.mset("c2", "6") - visor.mlist("ac") - visor.mclear() - } + visor.mlist("ac") + visor.mclear() } - describe("A 'mclear' visor command") { - it("should remove first two variables") { - visor.mset("key1", "value1") - visor.mset("key2", "value2") - visor.mset("key3", "value3") - - visor mclear "key1 key2" + "A 'mclear' visor command" should "remove first two variables" in { + visor.mset("key1", "value1") + visor.mset("key2", "value2") + visor.mset("key3", "value3") - visor.mlist() - visor.mclear() + visor mclear "key1 key2" - } + visor.mlist() + visor.mclear() + } - it("should remove all variables") { - visor.mset("key1", "value1") - visor.mset("key2", "value2") - visor.mset("key3", "value3") + "A 'mclear' visor command" should "remove all variables" in { + visor.mset("key1", "value1") + visor.mset("key2", "value2") + visor.mset("key3", "value3") - visor.mclear() - visor.mlist() - } + visor.mclear() + visor.mlist() } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a6dd007/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/node/VisorNodeCommandSpec.scala ---------------------------------------------------------------------- diff --git a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/node/VisorNodeCommandSpec.scala b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/node/VisorNodeCommandSpec.scala index c0983c0..992ff7f 100644 --- a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/node/VisorNodeCommandSpec.scala +++ b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/node/VisorNodeCommandSpec.scala @@ -24,19 +24,19 @@ import org.apache.ignite.visor.commands.node.VisorNodeCommand._ * Unit test for 'node' command. */ class VisorNodeCommandSpec extends VisorRuntimeBaseSpec(1) { - describe("A 'node' visor command") { - it("should properly execute with valid node ID") { - visor.node("-id8=@n1") - } + behavior of "A 'node' visor command" - it("should print the error message for invalid node ID") { - visor.node("-id8=zeee") - } + it should "properly execute with valid node ID" in { + visor.node("-id8=@n1") + } + + it should "print the error message for invalid node ID" in { + visor.node("-id8=zeee") + } - it("should print error message when not connected") { - closeVisorQuiet() + it should "print error message when not connected" in { + closeVisorQuiet() - visor.node("") // Arguments are ignored. - } + visor.node("") // Arguments are ignored. } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a6dd007/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/open/VisorOpenCommandSpec.scala ---------------------------------------------------------------------- diff --git a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/open/VisorOpenCommandSpec.scala b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/open/VisorOpenCommandSpec.scala index 4cf2204..786d04e 100644 --- a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/open/VisorOpenCommandSpec.scala +++ b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/open/VisorOpenCommandSpec.scala @@ -24,15 +24,15 @@ import org.apache.ignite.visor.{VisorRuntimeBaseSpec, visor} * Unit test for 'open' command. */ class VisorOpenCommandSpec extends VisorRuntimeBaseSpec(3) { - describe("A 'open' visor command") { - it("should properly connect using default configuration") { - visor.mlist() - } + behavior of "A 'open' visor command" + + it should "properly connect using default configuration" in { + visor.mlist() + } - it("should print error message when already connected") { - intercept[IgniteException] { - openVisor() - } + it should "print error message when already connected" in { + intercept[IgniteException] { + openVisor() } } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a6dd007/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/ping/VisorPingCommandSpec.scala ---------------------------------------------------------------------- diff --git a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/ping/VisorPingCommandSpec.scala b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/ping/VisorPingCommandSpec.scala index 06e3a22..dde5f18 100644 --- a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/ping/VisorPingCommandSpec.scala +++ b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/ping/VisorPingCommandSpec.scala @@ -24,15 +24,15 @@ import org.apache.ignite.visor.commands.ping.VisorPingCommand._ * Unit test for 'ping' command. */ class VisorPingCommandSpec extends VisorRuntimeBaseSpec(2) { - describe("A 'ping' visor command") { - it("should properly execute") { - visor.ping() - } + behavior of "A 'ping' visor command" - it("should print error message when not connected") { - closeVisorQuiet() + it should "properly execute" in { + visor.ping() + } + + it should "print error message when not connected" in { + closeVisorQuiet() - visor.ping() - } + visor.ping() } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a6dd007/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/start/VisorStartCommandSpec.scala ---------------------------------------------------------------------- diff --git a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/start/VisorStartCommandSpec.scala b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/start/VisorStartCommandSpec.scala index c6404b5..1a451c4 100644 --- a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/start/VisorStartCommandSpec.scala +++ b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/start/VisorStartCommandSpec.scala @@ -26,7 +26,7 @@ import org.apache.ignite.visor.commands.top.VisorTopologyCommand._ /** * Unit test for 'start' command. */ -class VisorStartCommandSpec extends FunSpec with Matchers with BeforeAndAfterAll { +class VisorStartCommandSpec extends FlatSpec with Matchers with BeforeAndAfterAll { override def beforeAll() { visor.open("-d") } @@ -35,89 +35,89 @@ class VisorStartCommandSpec extends FunSpec with Matchers with BeforeAndAfterAll visor.close() } - describe("A 'start' visor command") { - it("should should start one new node") { - visor.start("-h=192.168.1.103 -r -p=password") - } + behavior of "A 'start' visor command" - it("should should start two nodes") { - visor.start("-h=uname:passwd@localhost -n=2") - } + it should "should start one new node" in { + visor.start("-h=192.168.1.103 -r -p=password") + } - it("should print error message with invalid port number") { - visor.start("-h=localhost:x -p=passwd") - } + it should "should start two nodes" in { + visor.start("-h=uname:passwd@localhost -n=2") + } - it("should print error message with zero port number") { - visor.start("-h=localhost:0 -p=passwd") - } + it should "print error message with invalid port number" in { + visor.start("-h=localhost:x -p=passwd") + } - it("should print error message with negative port number") { - visor.start("-h=localhost:-1 -p=passwd") - } + it should "print error message with zero port number" in { + visor.start("-h=localhost:0 -p=passwd") + } - it("should print error message with invalid nodes count") { - visor.start("-h=localhost#x -p=passwd") - } + it should "print error message with negative port number" in { + visor.start("-h=localhost:-1 -p=passwd") + } - it("should print error message with zero nodes count") { - visor.start("-h=localhost#0 -p=passwd") - } + it should "print error message with invalid nodes count" in { + visor.start("-h=localhost#x -p=passwd") + } - it("should print error message with negative nodes count") { - visor.start("-h=localhost#-1 -p=passwd") - } + it should "print error message with zero nodes count" in { + visor.start("-h=localhost#0 -p=passwd") + } - it("should print error message with incorrect host") { - visor.start("-h=incorrect -p=passwd") - } + it should "print error message with negative nodes count" in { + visor.start("-h=localhost#-1 -p=passwd") + } - it("should print error message with incorrect username") { - visor.start("-h=incorrect@localhost -p=passwd") - } + it should "print error message with incorrect host" in { + visor.start("-h=incorrect -p=passwd") + } - it("should print error message with incorrect password") { - visor.start("-h=uname:incorrect@localhost") - } + it should "print error message with incorrect username" in { + visor.start("-h=incorrect@localhost -p=passwd") + } - it("should print error message with nonexistent script path") { - visor.start("-h=uname:passwd@localhost -s=incorrect") - } + it should "print error message with incorrect password" in { + visor.start("-h=uname:incorrect@localhost") + } - it("should print error message with incorrect script path") { - visor.start("-h=uname:passwd@localhost -s=bin/readme.txt") - } + it should "print error message with nonexistent script path" in { + visor.start("-h=uname:passwd@localhost -s=incorrect") + } - it("should print error message with nonexistent config path") { - visor.start("-h=uname:passwd@localhost -c=incorrect") - } + it should "print error message with incorrect script path" in { + visor.start("-h=uname:passwd@localhost -s=bin/readme.txt") + } - it("should print error message with incorrect config path") { - visor.start("-h=uname:passwd@localhost -c=bin/readme.txt") - } + it should "print error message with nonexistent config path" in { + visor.start("-h=uname:passwd@localhost -c=incorrect") + } - it("should start one node") { - visor.start("-h=uname:passwd@localhost") + it should "print error message with incorrect config path" in { + visor.start("-h=uname:passwd@localhost -c=bin/readme.txt") + } - visor.top() - } + it should "start one node" in { + visor.start("-h=uname:passwd@localhost") - it("should start one node on host identified by IP") { - visor.start("-h=uname:passwd@127.0.0.1") + visor.top() + } + + it should "start one node on host identified by IP" in { + visor.start("-h=uname:passwd@127.0.0.1") - visor.top() - } + visor.top() + } - it("should start two nodes") { - visor.start("-h=uname:passwd@localhost#2") + it should "start two nodes" in { + visor.start("-h=uname:passwd@localhost#2") - visor.top() - } + visor.top() + } - it("should restart 4 nodes") { - visor.start("-h=uname:passwd@localhost#4 -r") + it should "restart 4 nodes" in { + visor.start("-h=uname:passwd@localhost#4 -r") - visor.top() - } + visor.top() } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a6dd007/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/tasks/VisorTasksCommandSpec.scala ---------------------------------------------------------------------- diff --git a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/tasks/VisorTasksCommandSpec.scala b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/tasks/VisorTasksCommandSpec.scala index db07543..320a6bb 100644 --- a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/tasks/VisorTasksCommandSpec.scala +++ b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/tasks/VisorTasksCommandSpec.scala @@ -34,7 +34,7 @@ import scala.collection._ /** * Unit test for 'tasks' command. */ -class VisorTasksCommandSpec extends FunSpec with Matchers with BeforeAndAfterAll { +class VisorTasksCommandSpec extends FlatSpec with Matchers with BeforeAndAfterAll { /** * Open visor and execute several tasks before all tests. */ @@ -103,78 +103,78 @@ class VisorTasksCommandSpec extends FunSpec with Matchers with BeforeAndAfterAll Ignition.stopAll(false) } - describe("A 'tasks' visor command") { - it("should print tasks when called w/o arguments") { - visor.tasks() - } + behavior of "A 'tasks' visor command" - it("should print error message with incorrect argument") { - visor.tasks("-xx") - } + it should "print tasks when called w/o arguments" in { + visor.tasks() + } - it("should print task summary when called for specific task") { - visor.tasks("-n=@t1") - } + it should "print error message with incorrect argument" in { + visor.tasks("-xx") + } - it("should print execution when called for specific execution") { - visor.tasks("-e=@e1") - } + it should "print task summary when called for specific task" in { + visor.tasks("-n=@t1") + } - it("should print all tasks") { - visor.tasks("-l") - } + it should "print execution when called for specific execution" in { + visor.tasks("-e=@e1") + } - it("should print all tasks and executions") { - visor.tasks("-l -a") - } + it should "print all tasks" in { + visor.tasks("-l") + } - it("should print tasks that started during last 5 seconds") { - visor.tasks("-l -t=5s") - } + it should "print all tasks and executions" in { + visor.tasks("-l -a") + } - it("should print error message about invalid time period") { - visor.tasks("-l -t=x2s") - } + it should "print tasks that started during last 5 seconds" in { + visor.tasks("-l -t=5s") + } - it("should print error message about negative time period") { - visor.tasks("-l -t=-10s") - } + it should "print error message about invalid time period" in { + visor.tasks("-l -t=x2s") + } - it("should print error message about invalid time period specification") { - visor.tasks("-l -t=10x") - } + it should "print error message about negative time period" in { + visor.tasks("-l -t=-10s") + } - it("should print task summary for the first task") { - visor.tasks("-n=TestTask1") - } + it should "print error message about invalid time period specification" in { + visor.tasks("-l -t=10x") + } - it("should print task summary and executions for the first task") { - visor.tasks("-n=TestTask1 -a") - } + it should "print task summary for the first task" in { + visor.tasks("-n=TestTask1") + } - it("should print list of tasks grouped by nodes") { - visor.tasks("-g") - } + it should "print task summary and executions for the first task" in { + visor.tasks("-n=TestTask1 -a") + } - it("should print list of tasks that started during last 5 minutes grouped by nodes") { - visor.tasks("-g -t=5m") - } + it should "print list of tasks grouped by nodes" in { + visor.tasks("-g") + } - it("should print list of tasks grouped by hosts") { - visor.tasks("-h") - } + it should "print list of tasks that started during last 5 minutes grouped by nodes" in { + visor.tasks("-g -t=5m") + } - it("should print list of tasks that started during last 5 minutes grouped by hosts") { - visor.tasks("-h -t=5m") - } + it should "print list of tasks grouped by hosts" in { + visor.tasks("-h") + } - it("should print list of tasks filtered by substring") { - visor.tasks("-s=TestTask") - } + it should "print list of tasks that started during last 5 minutes grouped by hosts" in { + visor.tasks("-h -t=5m") + } - it("should print list of tasks and executions filtered by substring") { - visor.tasks("-s=TestTask -a") - } + it should "print list of tasks filtered by substring" in { + visor.tasks("-s=TestTask") + } + + it should "print list of tasks and executions filtered by substring" in { + visor.tasks("-s=TestTask -a") } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a6dd007/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/top/VisorTopologyCommandSpec.scala ---------------------------------------------------------------------- diff --git a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/top/VisorTopologyCommandSpec.scala b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/top/VisorTopologyCommandSpec.scala index 515cf67..3a3b6e5 100644 --- a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/top/VisorTopologyCommandSpec.scala +++ b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/top/VisorTopologyCommandSpec.scala @@ -24,39 +24,39 @@ import org.apache.ignite.visor.commands.top.VisorTopologyCommand._ * Unit test for topology commands. */ class VisorTopologyCommandSpec extends VisorRuntimeBaseSpec(2) { - describe("A 'top' visor command") { - it("should advise to connect") { - closeVisorQuiet() + behavior of "A 'top' visor command" - visor.top() - } + it should "advise to connect" in { + closeVisorQuiet() - it("should print error message") { - visor.top("-cc=eq1x") - } + visor.top() + } + + it should "print error message" in { + visor.top("-cc=eq1x") + } - it("should print full topology") { - visor.top() - } + it should "print full topology" in { + visor.top() + } - it("should print nodes with idle time greater than 12000ms") { - visor.top("-it=gt12000") - } + it should "print nodes with idle time greater than 12000ms" in { + visor.top("-it=gt12000") + } - it("should print nodes with idle time greater than 12sec") { - visor.top("-it=gt12s") - } + it should "print nodes with idle time greater than 12sec" in { + visor.top("-it=gt12s") + } - it("should print full information about all nodes") { - visor.top("-a") - } + it should "print full information about all nodes" in { + visor.top("-a") + } - it("should print information about nodes on localhost") { - visor.top("-h=192.168.1.100") - } + it should "print information about nodes on localhost" in { + visor.top("-h=192.168.1.100") + } - it("should print full information about nodes on localhost") { - visor.top("-h=localhost") - } + it should "print full information about nodes on localhost" in { + visor.top("-h=localhost") } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a6dd007/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/vvm/VisorVvmCommandSpec.scala ---------------------------------------------------------------------- diff --git a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/vvm/VisorVvmCommandSpec.scala b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/vvm/VisorVvmCommandSpec.scala index 1a4bc3e..969fb94 100644 --- a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/vvm/VisorVvmCommandSpec.scala +++ b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/vvm/VisorVvmCommandSpec.scala @@ -25,22 +25,22 @@ import org.apache.ignite.visor.commands.vvm.VisorVvmCommand._ /** * Unit test for 'vvm' command. */ -class VisorVvmCommandSpec extends FunSpec with Matchers { - describe("A 'vvm' visor command") { - it("should print error message when not connected") { - visor.vvm() - } +class VisorVvmCommandSpec extends FlatSpec with Matchers { + behavior of "A 'vvm' visor command" - it("should open VisualVM connected to all nodes skipping ones with disabled JMX") { - visor.open("-d") - visor.vvm() - visor.close() - } + it should "print error message when not connected" in { + visor.vvm() + } + + it should "open VisualVM connected to all nodes skipping ones with disabled JMX" in { + visor.open("-d") + visor.vvm() + visor.close() + } - it("should open VisualVM connected to first node if it has JMX enabled") { - visor.open("-d") - visor.vvm("-id8=@n1") - visor.close() - } + it should "open VisualVM connected to first node if it has JMX enabled" in { + visor.open("-d") + visor.vvm("-id8=@n1") + visor.close() } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a6dd007/parent/pom.xml ---------------------------------------------------------------------- diff --git a/parent/pom.xml b/parent/pom.xml index cd098d9..661b310 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -619,7 +619,6 @@ **/keystore/*.pfx DEVNOTES.txt - DEPENDENCIES src/main/java/org/apache/ignite/internal/util/offheap/unsafe/GridOffHeapSnapTreeMap.java src/main/java/org/apache/ignite/internal/util/snaptree/*.java src/main/java/org/jsr166/*.java @@ -629,7 +628,6 @@ src/test/java/org/apache/ignite/spi/deployment/uri/META-INF/ignite.empty src/test/java/org/apache/ignite/spi/deployment/uri/META-INF/ignite.brokenxml src/test/java/org/apache/ignite/internal/processors/hadoop/books/*.txt - src/main/java/org/apache/ignite/examples/streaming/wordcount/*.txt examples/src/main/java/org/apache/ignite/examples/streaming/wordcount/*.txt src/main/java/META-INF/services/javax.cache.spi.CachingProvider src/main/java/org/jetbrains/annotations/*.java http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a6dd007/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index 8886c8a..c5a9e5d 100644 --- a/pom.xml +++ b/pom.xml @@ -36,6 +36,8 @@ pom + scp://localhost:/home + ${project.artifactId}-${project.version} ignite-${ignite.edition}-${project.version} @@ -47,6 +49,13 @@ HEAD + + + ignite-site + ${ignite.site}/${ignite.site.folder} + + + modules/tools modules/core @@ -113,6 +122,26 @@ org.apache.maven.plugins + maven-clean-plugin + + + clean + + clean + + + + + libs + + + + + + + + + org.apache.maven.plugins maven-antrun-plugin 1.7 false @@ -246,7 +275,7 @@ - + @@ -254,7 +283,7 @@ - + @@ -291,8 +320,6 @@ - - @@ -566,12 +593,36 @@ - + + + + org.apache.maven.plugins + maven-site-plugin + 3.4 + + + org.apache.maven.wagon + wagon-ssh + 2.8 + + + + + + deploy + + deploy + + ${basedir}/target/site + + + + @@ -689,28 +740,4 @@ - - - - - org.apache.maven.plugins - maven-clean-plugin - - - clean - - clean - - - - - libs - - - - - - - -