You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2015/06/17 14:06:39 UTC
[29/50] incubator-ignite git commit: #IGNITE-960 Fixed test.
#IGNITE-960 Fixed test.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/dd8048bd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/dd8048bd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/dd8048bd
Branch: refs/heads/ignite-gg-10123
Commit: dd8048bd7c4c143395dbc0f18010d101698604cd
Parents: a7ca45b
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Tue Jun 16 17:51:57 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Tue Jun 16 17:51:57 2015 +0300
----------------------------------------------------------------------
modules/spring/src/test/config/node1.xml | 2 +-
modules/spring/src/test/config/store-cache1.xml | 2 +-
.../jdbc/CacheJdbcBlobStoreFactorySelfTest.java | 63 +++++++++++++++++++-
.../jdbc/CacheJdbcPojoStoreFactorySelfTest.java | 3 +-
4 files changed, 63 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dd8048bd/modules/spring/src/test/config/node1.xml
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/config/node1.xml b/modules/spring/src/test/config/node1.xml
index 67bae12..76539f7 100644
--- a/modules/spring/src/test/config/node1.xml
+++ b/modules/spring/src/test/config/node1.xml
@@ -22,7 +22,7 @@
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
- <bean id="simpleDataSource" class="sun.jdbc.odbc.ee.ConnectionPoolDataSource"/>
+ <bean id="simpleDataSource" class="org.apache.ignite.cache.store.jdbc.CacheJdbcBlobStoreFactorySelfTest$DummyDataSource"/>
<bean id="ignite.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
<property name="gridName" value="ignite1"/>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dd8048bd/modules/spring/src/test/config/store-cache1.xml
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/config/store-cache1.xml b/modules/spring/src/test/config/store-cache1.xml
index bff88e9..a9e58d6 100644
--- a/modules/spring/src/test/config/store-cache1.xml
+++ b/modules/spring/src/test/config/store-cache1.xml
@@ -23,7 +23,7 @@
http://www.springframework.org/schema/beans/spring-beans.xsd">
- <bean id="simpleDataSource1" class="sun.jdbc.odbc.ee.ConnectionPoolDataSource"/>
+ <bean id="simpleDataSource1" class="org.apache.ignite.cache.store.jdbc.CacheJdbcBlobStoreFactorySelfTest$DummyDataSource"/>
<bean id="ignite.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
<property name="gridName" value="ignite1"/>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dd8048bd/modules/spring/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcBlobStoreFactorySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcBlobStoreFactorySelfTest.java b/modules/spring/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcBlobStoreFactorySelfTest.java
index 6d3d3fd..7638a46 100644
--- a/modules/spring/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcBlobStoreFactorySelfTest.java
+++ b/modules/spring/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcBlobStoreFactorySelfTest.java
@@ -22,9 +22,11 @@ import org.apache.ignite.configuration.*;
import org.apache.ignite.testframework.*;
import org.apache.ignite.testframework.junits.common.*;
import org.h2.jdbcx.*;
-import sun.jdbc.odbc.ee.*;
+import java.io.*;
+import java.sql.*;
import java.util.concurrent.*;
+import java.util.logging.*;
/**
* Test for Cache jdbc blob store factory.
@@ -44,7 +46,7 @@ public class CacheJdbcBlobStoreFactorySelfTest extends GridCommonAbstractTest {
try(Ignite ignite1 = Ignition.start("modules/spring/src/test/config/store-cache1.xml")) {
checkStore(ignite.<Integer, String>cache(CACHE_NAME), JdbcDataSource.class);
- checkStore(ignite1.<Integer, String>cache(CACHE_NAME), ConnectionPoolDataSource.class);
+ checkStore(ignite1.<Integer, String>cache(CACHE_NAME), DummyDataSource.class);
}
}
}
@@ -59,7 +61,7 @@ public class CacheJdbcBlobStoreFactorySelfTest extends GridCommonAbstractTest {
try (IgniteCache<Integer, String> cache1 = ignite1.getOrCreateCache(cacheConfiguration())) {
checkStore(cache, JdbcDataSource.class);
- checkStore(cache1, ConnectionPoolDataSource.class);
+ checkStore(cache1, DummyDataSource.class);
}
}
}
@@ -112,4 +114,59 @@ public class CacheJdbcBlobStoreFactorySelfTest extends GridCommonAbstractTest {
assertEquals(dataSrcClass,
GridTestUtils.getFieldValue(store, CacheJdbcBlobStore.class, "dataSrc").getClass());
}
+
+ /**
+ *
+ */
+ public static class DummyDataSource implements javax.sql.DataSource, Serializable {
+ /** */
+ public DummyDataSource() {
+ // No-op.
+ }
+
+ /** {@inheritDoc} */
+ @Override public Connection getConnection() throws SQLException {
+ return null;
+ }
+
+ /** {@inheritDoc} */
+ @Override public Connection getConnection(String username, String password) throws SQLException {
+ return null;
+ }
+
+ /** {@inheritDoc} */
+ @Override public PrintWriter getLogWriter() throws SQLException {
+ return null;
+ }
+
+ /** {@inheritDoc} */
+ @Override public void setLogWriter(PrintWriter out) throws SQLException {
+ // No-op.
+ }
+
+ /** {@inheritDoc} */
+ @Override public void setLoginTimeout(int seconds) throws SQLException {
+ // No-op.
+ }
+
+ /** {@inheritDoc} */
+ @Override public int getLoginTimeout() throws SQLException {
+ return 0;
+ }
+
+ /** {@inheritDoc} */
+ @Override public Logger getParentLogger() throws SQLFeatureNotSupportedException {
+ return null;
+ }
+
+ /** {@inheritDoc} */
+ @Override public <T> T unwrap(Class<T> iface) throws SQLException {
+ return null;
+ }
+
+ /** {@inheritDoc} */
+ @Override public boolean isWrapperFor(Class<?> iface) throws SQLException {
+ return false;
+ }
+ }
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dd8048bd/modules/spring/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreFactorySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreFactorySelfTest.java b/modules/spring/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreFactorySelfTest.java
index 7b709d5..c456339 100644
--- a/modules/spring/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreFactorySelfTest.java
+++ b/modules/spring/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreFactorySelfTest.java
@@ -23,7 +23,6 @@ import org.apache.ignite.configuration.*;
import org.apache.ignite.testframework.*;
import org.apache.ignite.testframework.junits.common.*;
import org.h2.jdbcx.*;
-import sun.jdbc.odbc.ee.*;
import javax.cache.*;
import java.io.*;
@@ -47,7 +46,7 @@ public class CacheJdbcPojoStoreFactorySelfTest extends GridCommonAbstractTest {
try (IgniteCache<Integer, String> cache1 = ignite1.getOrCreateCache(cacheConfiguration())) {
checkStore(cache, JdbcDataSource.class);
- checkStore(cache1, ConnectionPoolDataSource.class);
+ checkStore(cache1, CacheJdbcBlobStoreFactorySelfTest.DummyDataSource.class);
}
}
}