File tree Expand file tree Collapse file tree 4 files changed +23
-19
lines changed
core/src/test/java/org/apache/ignite
internal/processors/cache
main/java/org/apache/ignite/spi/discovery/zk
test/java/org/apache/ignite/spi/discovery/zk Expand file tree Collapse file tree 4 files changed +23
-19
lines changed Original file line number Diff line number Diff line change 9696import org .apache .ignite .services .Service ;
9797import org .apache .ignite .services .ServiceContext ;
9898import org .apache .ignite .testframework .GridTestUtils ;
99+ import org .apache .ignite .testframework .junits .WithSystemProperty ;
99100import org .apache .ignite .transactions .Transaction ;
100101import org .apache .ignite .transactions .TransactionConcurrency ;
101102import org .apache .ignite .transactions .TransactionIsolation ;
126127 * Full API cache test.
127128 */
128129@ SuppressWarnings ("TransientFieldInNonSerializableClass" )
130+ @ WithSystemProperty (key = "h2.check" , value = "false" )
129131public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstractSelfTest {
130132 /** Test timeout */
131133 private static final long TEST_TIMEOUT = 60 * 1000 ;
Original file line number Diff line number Diff line change @@ -1474,8 +1474,8 @@ protected Ignite startRemoteGrid(
14741474
14751475 resetDiscovery = false ;
14761476 }
1477- catch (NoSuchMethodException ignore ) {
1478- // Ignore.
1477+ catch (NoSuchMethodException e ) {
1478+ log . warning ( "Failed to clone Discovery SPI. cloneSpiConfiguration method was not found" , e );
14791479 }
14801480 }
14811481 }
Original file line number Diff line number Diff line change @@ -552,23 +552,6 @@ private ZookeeperClusterNode initLocalNode() {
552552 return locNode ;
553553 }
554554
555- /**
556- * Used in tests (called via reflection).
557- *
558- * @return Copy of SPI.
559- */
560- private ZookeeperDiscoverySpi cloneSpiConfiguration () {
561- ZookeeperDiscoverySpi spi = new ZookeeperDiscoverySpi ();
562-
563- spi .setZkRootPath (zkRootPath );
564- spi .setZkConnectionString (zkConnectionString );
565- spi .setSessionTimeout (sesTimeout );
566- spi .setJoinTimeout (joinTimeout );
567- spi .setClientReconnectDisabled (clientReconnectDisabled );
568-
569- return spi ;
570- }
571-
572555 /** {@inheritDoc} */
573556 @ Override public String toString () {
574557 return S .toString (ZookeeperDiscoverySpi .class , this );
Original file line number Diff line number Diff line change 2828import org .apache .ignite .spi .discovery .tcp .IgniteDiscoverySpiInternalListenerSupport ;
2929import org .apache .ignite .spi .discovery .tcp .TcpDiscoverySpi ;
3030import org .apache .ignite .testframework .config .GridTestProperties ;
31+ import org .apache .ignite .testframework .junits .GridAbstractTest ;
3132
3233/**
3334 * Allows to run regular Ignite tests with {@link org.apache.ignite.spi.discovery.zk.ZookeeperDiscoverySpi}.
@@ -117,5 +118,23 @@ private static class TestZookeeperDiscoverySpi extends ZookeeperDiscoverySpi imp
117118 @ Override public void setInternalListener (IgniteDiscoverySpiInternalListener lsnr ) {
118119 internalLsnr = lsnr ;
119120 }
121+
122+ /**
123+ * Creates copy of current SPI instance. Is called by test framework using reflection
124+ * (see {@link GridAbstractTest#startRemoteGrid}).
125+ *
126+ * @return Copy of current SPI instance.
127+ */
128+ public ZookeeperDiscoverySpi cloneSpiConfiguration () {
129+ ZookeeperDiscoverySpi spi = new TestZookeeperDiscoverySpi ();
130+
131+ spi .setZkRootPath (getZkRootPath ());
132+ spi .setZkConnectionString (getZkConnectionString ());
133+ spi .setSessionTimeout (getSessionTimeout ());
134+ spi .setJoinTimeout (getJoinTimeout ());
135+ spi .setClientReconnectDisabled (isClientReconnectDisabled ());
136+
137+ return spi ;
138+ }
120139 }
121140}
You can’t perform that action at this time.
0 commit comments