ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject [34/50] [abbrv] ignite git commit: Fixed IgniteStartFromStreamConfigurationTest to stop started node.
Date Thu, 24 Nov 2016 13:24:44 GMT
Fixed IgniteStartFromStreamConfigurationTest to stop started node.


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

Branch: refs/heads/ignite-4242
Commit: a2a3bedce1a232c0c1db6f5e2b737ab47be250b0
Parents: c3e8a83
Author: sboikov <sboikov@gridgain.com>
Authored: Mon Nov 14 09:44:48 2016 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Mon Nov 14 09:44:48 2016 +0300

----------------------------------------------------------------------
 .../IgniteStartFromStreamConfigurationTest.java   | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/a2a3bedc/modules/spring/src/test/java/org/apache/ignite/spring/IgniteStartFromStreamConfigurationTest.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/java/org/apache/ignite/spring/IgniteStartFromStreamConfigurationTest.java
b/modules/spring/src/test/java/org/apache/ignite/spring/IgniteStartFromStreamConfigurationTest.java
index 0ef08f1..421011f 100644
--- a/modules/spring/src/test/java/org/apache/ignite/spring/IgniteStartFromStreamConfigurationTest.java
+++ b/modules/spring/src/test/java/org/apache/ignite/spring/IgniteStartFromStreamConfigurationTest.java
@@ -30,21 +30,25 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
  * Checks starts from Stream.
  */
 public class IgniteStartFromStreamConfigurationTest extends GridCommonAbstractTest {
-    /** Tests starts from Stream. */
+    /**
+     * Tests starts from stream.
+     *
+     * @throws Exception If failed.
+     */
     public void testStartFromStream() throws Exception {
         String cfg = "examples/config/example-cache.xml";
 
         URL cfgLocation = U.resolveIgniteUrl(cfg);
 
-        Ignite grid = Ignition.start(new FileInputStream(cfgLocation.getFile()));
+        try (Ignite grid = Ignition.start(new FileInputStream(cfgLocation.getFile()))) {
+            grid.cache(null).put("1", "1");
 
-        grid.cache(null).put("1", "1");
+            assert grid.cache(null).get("1").equals("1");
 
-        assert grid.cache(null).get("1").equals("1");
+            IgniteConfiguration icfg = Ignition.loadSpringBean(new FileInputStream(cfgLocation.getFile()),
"ignite.cfg");
 
-        IgniteConfiguration icfg = Ignition.loadSpringBean(new FileInputStream(cfgLocation.getFile()),
"ignite.cfg");
-
-        assert icfg.getCacheConfiguration()[0].getAtomicityMode() == CacheAtomicityMode.ATOMIC;
+            assert icfg.getCacheConfiguration()[0].getAtomicityMode() == CacheAtomicityMode.ATOMIC;
+        }
     }
 
 }
\ No newline at end of file


Mime
View raw message