Skip to content
Open

test #26

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
135 commits
Select commit Hold shift + click to select a range
c5da193
IGNITE-9560
dgarus Oct 4, 2018
3759e19
IGNITE-9560 Added tests for compute case
dgarus Oct 5, 2018
441d14d
Merge branch 'master' into IGNITE-9560_1
dgarus Oct 8, 2018
455268b
IGNITE-9560 Added test suite. Added abstract initiator test class.
dgarus Oct 9, 2018
db74af1
IGNITE-9560 Added test for execution service tasks.
dgarus Oct 10, 2018
32af131
IGNITE-9560 Added test for execution service tasks.
dgarus Oct 10, 2018
69f1d7b
IGNITE-9560 Added test for ScanQuery and EntityProcessor
dgarus Oct 17, 2018
0cd883d
Merge branch 'master' into IGNITE-9560_1
dgarus Oct 17, 2018
3b7ff82
IGNITE-9560 Added tests for Distributed closure, DataStream, LoadCach…
dgarus Oct 24, 2018
58432f9
Merge branch 'master' into IGNITE-9560_1
dgarus Oct 24, 2018
79140c5
IGNITE-9560 Refact
dgarus Oct 24, 2018
f177de9
IGNITE-9560 fix comment
dgarus Oct 25, 2018
0cb3153
Merge branch 'master' into IGNITE-9560_1
dgarus Oct 25, 2018
38c7d4c
IGNITE-9560 fix comment
dgarus Oct 25, 2018
9835315
IGNITE-9560 dflt test SP
dgarus Oct 30, 2018
4c3af00
ignite-9560 Security processor for test
dgarus Oct 30, 2018
a7a51f6
IGNITE-9560 fw
dgarus Nov 6, 2018
2ffb43d
IGNITE-9560 fix comment
dgarus Nov 6, 2018
dc85dd2
IGNITE-9560 fix comment
dgarus Nov 6, 2018
b73523f
IGNITE-9560 fix comment
dgarus Nov 6, 2018
a98b6ef
Merge remote-tracking branch 'origin/IGNITE-9560_1' into IGNITE-9560_1
dgarus Nov 7, 2018
7dcfaad
IGNITE-9560 fix comment
dgarus Nov 7, 2018
aeaf038
IGNITE-9560 fix comment
dgarus Nov 7, 2018
129079b
IGNITE-9560 fix comment
dgarus Nov 8, 2018
95f8f56
IGNITE-9560 thin client test
dgarus Nov 21, 2018
4f0fc0a
IGNITE-9560 added thin client test class
dgarus Nov 23, 2018
d465f6f
IGNITE-9560 fix comments
dgarus Nov 23, 2018
191eb8d
Merge branch 'master' into IGNITE-9560_1
dgarus Nov 23, 2018
05297d9
IGNITE-9560 fix comments
dgarus Nov 23, 2018
349afb5
IGNITE-9560 fix comments
dgarus Nov 28, 2018
98bb765
IGNITE-9560 Added messaging fix and tests. Deleted authorize from thi…
dgarus Dec 3, 2018
72ae40b
Merge branch 'master' into IGNITE-9560_1
dgarus Dec 4, 2018
62b192f
IGNITE-9560 Grid Security Manager.
dgarus Dec 6, 2018
fd21279
IGNITE-9560 fix comments
dgarus Dec 7, 2018
ecd56e0
IGNITE-9560 fix comments
dgarus Dec 10, 2018
18f2dc3
IGNITE-9560 Added Server/Client node tests.
dgarus Dec 11, 2018
2db4a9b
IGNITE-9560 Added Data Streamer cache permissions test on Server/Clie…
dgarus Dec 11, 2018
bc7e40d
IGNITE-9560 Added execute task permission test for Execute service.
dgarus Dec 12, 2018
93fe249
IGNITE-9560 Added test for compute service.
dgarus Dec 14, 2018
90a615f
IGNITE-9560 Added cache permission tests for ScanQuery, EntryProcesso…
dgarus Dec 19, 2018
204a7b3
Merge branch 'master' into IGNITE-9560_1
dgarus Dec 19, 2018
8a76382
IGNITE-9560 Fix comments.
dgarus Dec 21, 2018
38d51b8
Merge branch 'master' into IGNITE-9560_1
dgarus Dec 21, 2018
bb7b628
IGNITE-9560 Version 2.8.0
dgarus Dec 21, 2018
b0683e2
IGNITE-9560 Renaming
dgarus Dec 24, 2018
32b442f
Merge branch 'master' into IGNITE-9560_1
dgarus Dec 25, 2018
f0e1269
IGNITE-9560 JUnit4
dgarus Dec 26, 2018
5e62d36
Merge branch 'master' into IGNITE-9560_1
dgarus Jan 18, 2019
4442328
IGNITE-9560 Invoke a closure from the closure
dgarus Jan 24, 2019
9e28715
Merge branch 'master' into IGNITE-9560_1
dgarus Jan 24, 2019
a580483
IGNITE-9560 Modified the logic of IgniteSecurityProcessorImpl with ta…
dgarus Jan 30, 2019
a6f9d1c
Merge branch 'master' into IGNITE-9560_1
dgarus Jan 30, 2019
2962f70
IGNITE-9560 NoOpIgniteSecurityProcessor. Delete old version of attrib…
dgarus Feb 4, 2019
587af15
IGNITE-9560 Renaming.
dgarus Feb 5, 2019
13aa42d
IGNITE-9560 Renaming.
dgarus Feb 6, 2019
c743636
Merge branch 'master' into IGNITE-9560_1
dgarus Feb 6, 2019
4401fcd
IGNITE-9560 JUnit4
dgarus Feb 6, 2019
96c086f
IGNITE-9560 Test class renaming
dgarus Feb 6, 2019
9864406
IGNITE-9560 Test class renaming
dgarus Feb 6, 2019
f2264a9
IGNITE-9560 Test class renaming
dgarus Feb 6, 2019
50f70d9
IGNITE-9560 Fix comments.
dgarus Feb 8, 2019
106bde0
Merge branch 'master' into IGNITE-9560_1
dgarus Feb 8, 2019
39bd243
IGNITE-9560 Fix comments.
dgarus Feb 8, 2019
eec3f3a
IGNITE-9560 Fix comments.
dgarus Feb 11, 2019
f9472d1
IGNITE-9560 Fix comments.
dgarus Feb 11, 2019
36f3463
Merge branch 'master' into IGNITE-9560_1
dgarus Feb 12, 2019
da5c2f5
IGNITE-9560 fix comments
dgarus Feb 13, 2019
251b62e
IGNITE-9560 fix comments
dgarus Feb 13, 2019
914e15b
Merge branch 'master' into IGNITE-9560_1
dgarus Feb 13, 2019
27af04e
IGNITE-9560 fix comments
dgarus Feb 14, 2019
de10bda
Merge branch 'master' into IGNITE-9560_1
dgarus Feb 14, 2019
de736d0
IGNITE-9560 fix comments
dgarus Feb 14, 2019
d2f66f5
IGNITE-9560 fix comments
dgarus Feb 15, 2019
45679cb
IGNITE-9560 fix comments
dgarus Feb 15, 2019
5c08233
IGNITE-9560 fix tests
dgarus Feb 15, 2019
de4df83
Merge branch 'master' into IGNITE-9560_1
dgarus Feb 16, 2019
24be142
IGNITE-9560 support EntProc
dgarus Feb 20, 2019
d9549a2
IGNITE-9560 support EntProc
dgarus Feb 21, 2019
e9b6a36
IGNITE-9560 support EntProc
dgarus Feb 22, 2019
56bde9f
Merge branch 'master' into IGNITE-9560_1
dgarus Feb 27, 2019
ba1a591
IGNITE-9560 fix test
dgarus Feb 28, 2019
4f857b7
IMDBGG-1522 Advanced tests for compute, cache, datastreamer
dgarus Feb 28, 2019
b01f162
IGNITE-9560 fix comments
dgarus Mar 4, 2019
729d08e
IMDBGG-1522 Advanced tests for compute, cache, datastreamer
dgarus Mar 4, 2019
4a72291
Merge branch 'IMDBGG-1522' into IGNITE-9560_1
dgarus Mar 4, 2019
2fd9630
IGNITE-9560 fix comments
dgarus Mar 5, 2019
f2f513d
IGNITE-9560 fix comments
dgarus Mar 7, 2019
4f2b3e9
IGNITE-9560 fix comments
dgarus Mar 7, 2019
86de8f3
IGNITE-9560 fix comments
dgarus Mar 12, 2019
08e5a88
IGNITE-9560 fix comments
dgarus Mar 14, 2019
6a8dd5b
Merge branch 'master' into IGNITE-9560_1
dgarus Mar 14, 2019
a56067a
IGNITE-9560 fix comments
dgarus Mar 15, 2019
af087f6
IGNITE-9560 fix comments
dgarus Mar 15, 2019
c161fcb
IGNITE-9560 fix comments
dgarus Mar 18, 2019
0d2bb61
IGNITE-9560 fix comments
dgarus Mar 19, 2019
fcb78db
IGNITE-9560 fix comments
dgarus Mar 20, 2019
cb74088
Merge branch 'master' into IGNITE-9560_1
dgarus Mar 20, 2019
d839df9
IGNITE-9560 fix comments
dgarus Mar 20, 2019
20a73eb
IGNITE-9560 fix comments
dgarus Mar 21, 2019
061ff49
IGNITE-9560 BroadcastRunner
dgarus Mar 21, 2019
75b246d
IGNITE-9560: test refactoring
nizhikov Mar 21, 2019
ef3f233
IGNITE-9560: test refactoring
nizhikov Mar 21, 2019
4343665
Merge pull request #6 from nizhikov/IGNITE-9560
dgarus Mar 21, 2019
58efaf8
IGNITE-9560 fix comments
dgarus Mar 21, 2019
1f0d8c0
Ignite 9560 rmv sec module (#8)
dgarus Mar 29, 2019
2c49569
Ignite 9560 rmv sec module (#9)
dgarus Mar 29, 2019
a963204
IGNITE-9560 renaming
dgarus Mar 29, 2019
bc97109
Revert "Ignite 9560 rmv sec module (#9)" (#10)
dgarus Mar 29, 2019
cbe0d0d
Merge branch 'master' into IGNITE-9560_1
dgarus Mar 29, 2019
4e6c01e
Merge branch 'master' of https://github.com/dgarus/ignite
dgarus Mar 29, 2019
34cc23f
Merge branch 'master' of https://github.com/apache/ignite
dgarus Apr 10, 2019
04aa26f
Merge branch 'master' into IGNITE-9560_1
dgarus Apr 10, 2019
18ca3e5
IGNITE-9560 (#11)
dgarus Apr 15, 2019
e84502c
IGNITE-9560: Tests reducing (#13)
nizhikov Apr 15, 2019
0a1b1cd
Ignite 9560 (#14)
nizhikov Apr 15, 2019
f058311
IGNITE-9560 code style
dgarus Apr 15, 2019
119bde1
Ignite 9560 (#15)
nizhikov Apr 16, 2019
3c9022c
IGNITE-9560 code style
dgarus Apr 16, 2019
3ec0e29
IGNITE-9560 fix index tests (#16)
dgarus Apr 16, 2019
c576781
IGNITE-9560 fix comments
dgarus Apr 16, 2019
b8af414
Merge branch 'master' of https://github.com/apache/ignite
dgarus Apr 16, 2019
4305052
Merge branch 'master' into IGNITE-9560_1
dgarus Apr 16, 2019
a4daf09
IGNITE-9560 fix clients tests
dgarus Apr 17, 2019
9872fe5
IGNITE-9560 English
dgarus Apr 17, 2019
99ed2a0
IGNITE-9560 Explicit plugin configuration added. (#17)
petrov-mg Apr 17, 2019
7e66888
IGNITE-9560 fix tests (#19)
dgarus Apr 17, 2019
1a32bc2
Revert "IGNITE-9560 Explicit plugin configuration added. (#17)" (#20)
dgarus Apr 18, 2019
9005e9c
Merge branch 'master' of https://github.com/apache/ignite
dgarus Apr 19, 2019
4e2d22c
Merge branch 'master' into IGNITE-9560_1
dgarus Apr 19, 2019
7799dae
IGNITE-9560 fix clients tests
dgarus Apr 19, 2019
89d4984
Merge branch 'master' of https://github.com/apache/ignite
dgarus Apr 22, 2019
80b6fa1
Merge branch 'master' into IGNITE-9560_1
dgarus Apr 22, 2019
a790730
Merge branch 'master' of https://github.com/apache/ignite
dgarus Apr 23, 2019
e04c837
Merge branch 'master' of https://github.com/apache/ignite
dgarus Apr 24, 2019
578dc70
Merge branch 'master' into IGNITE-9560_1
dgarus Apr 24, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.configuration.NearCacheConfiguration;
import org.apache.ignite.internal.util.typedef.F;
import org.apache.ignite.testframework.GridTestUtils.RunnableX;
import org.junit.Test;

/**
Expand Down Expand Up @@ -173,7 +174,7 @@ public void testCreateIndexWithDuplicateName() throws SQLException {

assertSqlException(new RunnableX() {
/** {@inheritDoc} */
@Override public void run() throws Exception {
@Override public void runx() throws Exception {
jdbcRun(CREATE_INDEX);
}
});
Expand Down Expand Up @@ -227,7 +228,7 @@ public void testDropIndex() throws SQLException {
public void testDropMissingIndex() {
assertSqlException(new RunnableX() {
/** {@inheritDoc} */
@Override public void run() throws Exception {
@Override public void runx() throws Exception {
jdbcRun(DROP_INDEX);
}
});
Expand Down Expand Up @@ -322,7 +323,7 @@ private static void assertSqlException(RunnableX r) {
// We expect IgniteSQLException with given code inside CacheException inside JDBC SQLException.

try {
r.run();
r.runx();
}
catch (SQLException e) {
return;
Expand All @@ -333,16 +334,4 @@ private static void assertSqlException(RunnableX r) {

fail(SQLException.class.getSimpleName() + " is not thrown.");
}

/**
* Runnable which can throw checked exceptions.
*/
private interface RunnableX {
/**
* Do run.
*
* @throws Exception If failed.
*/
public void run() throws Exception;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.Callable;
import org.apache.ignite.internal.IgniteEx;
import org.apache.ignite.internal.processors.odbc.ClientListenerProcessor;
import org.apache.ignite.internal.processors.port.GridPortRecord;
import org.apache.ignite.internal.util.typedef.F;
import org.apache.ignite.testframework.GridTestUtils;
import org.apache.ignite.testframework.GridTestUtils.RunnableX;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;

/**
Expand All @@ -49,68 +49,45 @@ public class JdbcThinAbstractSelfTest extends GridCommonAbstractTest {
* @param r Runnable to check support.
*/
protected void checkNotSupported(final RunnableX r) {
GridTestUtils.assertThrows(log,
new Callable<Object>() {
@Override public Object call() throws Exception {
r.run();

return null;
}
}, SQLFeatureNotSupportedException.class, null);
GridTestUtils.assertThrowsWithCause(r, SQLFeatureNotSupportedException.class);
}

/**
* @param r Runnable to check on closed connection.
*/
protected void checkConnectionClosed(final RunnableX r) {
GridTestUtils.assertThrows(log,
new Callable<Object>() {
@Override public Object call() throws Exception {
r.run();
GridTestUtils.assertThrowsAnyCause(log,
() -> {
r.run();

return null;
}
return null;
}, SQLException.class, "Connection is closed");
}

/**
* @param r Runnable to check on closed statement.
*/
protected void checkStatementClosed(final RunnableX r) {
GridTestUtils.assertThrows(log,
new Callable<Object>() {
@Override public Object call() throws Exception {
r.run();
GridTestUtils.assertThrowsAnyCause(log,
() -> {
r.run();

return null;
}
return null;
}, SQLException.class, "Statement is closed");
}

/**
* @param r Runnable to check on closed result set.
*/
protected void checkResultSetClosed(final RunnableX r) {
GridTestUtils.assertThrows(log,
new Callable<Object>() {
@Override public Object call() throws Exception {
r.run();
GridTestUtils.assertThrowsAnyCause(log,
() -> {
r.run();

return null;
}
return null;
}, SQLException.class, "Result set is closed");
}

/**
* Runnable that can throw an exception.
*/
interface RunnableX {
/**
* @throws Exception On error.
*/
void run() throws Exception;
}

/**
* @param node Node to connect to.
* @param params Connection parameters.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import org.apache.ignite.configuration.IgniteConfiguration;
import org.apache.ignite.internal.binary.BinaryMarshaller;
import org.apache.ignite.testframework.GridStringLogger;
import org.apache.ignite.testframework.GridTestUtils;
import org.jetbrains.annotations.NotNull;
import org.junit.Test;

Expand All @@ -37,6 +36,8 @@
import static java.sql.Connection.TRANSACTION_READ_UNCOMMITTED;
import static java.sql.Connection.TRANSACTION_REPEATABLE_READ;
import static java.sql.Connection.TRANSACTION_SERIALIZABLE;
import static org.apache.ignite.testframework.GridTestUtils.RunnableX;
import static org.apache.ignite.testframework.GridTestUtils.assertThrows;

/**
* Connection test.
Expand Down Expand Up @@ -120,7 +121,7 @@ public void testGetSetAutoCommit() throws Exception {

// Exception when called on closed connection
checkConnectionClosed(new RunnableX() {
@Override public void run() throws Exception {
@Override public void runx() throws Exception {
conn.setAutoCommit(true);
}
});
Expand All @@ -136,7 +137,7 @@ public void testCommit() throws Exception {
assertTrue(conn.getMetaData().supportsTransactions());

// Should not be called in auto-commit mode
GridTestUtils.assertThrows(log,
assertThrows(log,
new Callable<Object>() {
@Override public Object call() throws Exception {
conn.commit();
Expand All @@ -156,7 +157,7 @@ public void testCommit() throws Exception {

// Exception when called on closed connection
checkConnectionClosed(new RunnableX() {
@Override public void run() throws Exception {
@Override public void runx() throws Exception {
conn.commit();
}
});
Expand All @@ -172,7 +173,7 @@ public void testRollback() throws Exception {
assertTrue(conn.getMetaData().supportsTransactions());

// Should not be called in auto-commit mode
GridTestUtils.assertThrows(log,
assertThrows(log,
new Callable<Object>() {
@Override public Object call() throws Exception {
conn.rollback();
Expand All @@ -192,7 +193,7 @@ public void testRollback() throws Exception {

// Exception when called on closed connection
checkConnectionClosed(new RunnableX() {
@Override public void run() throws Exception {
@Override public void runx() throws Exception {
conn.rollback();
}
});
Expand All @@ -208,7 +209,7 @@ public void testSetSavepoint() throws Exception {
assert !conn.getMetaData().supportsSavepoints();

// Disallowed in auto-commit mode
GridTestUtils.assertThrows(log,
assertThrows(log,
new Callable<Object>() {
@Override public Object call() throws Exception {
conn.setSavepoint();
Expand All @@ -224,15 +225,15 @@ public void testSetSavepoint() throws Exception {

// Unsupported
checkNotSupported(new RunnableX() {
@Override public void run() throws Exception {
@Override public void runx() throws Exception {
conn.setSavepoint();
}
});

conn.close();

checkConnectionClosed(new RunnableX() {
@Override public void run() throws Exception {
@Override public void runx() throws Exception {
conn.setSavepoint();
}
});
Expand All @@ -248,7 +249,7 @@ public void testSetSavepointName() throws Exception {
assert !conn.getMetaData().supportsSavepoints();

// Invalid arg
GridTestUtils.assertThrows(log,
assertThrows(log,
new Callable<Object>() {
@Override public Object call() throws Exception {
conn.setSavepoint(null);
Expand All @@ -263,7 +264,7 @@ public void testSetSavepointName() throws Exception {
final String name = "savepoint";

// Disallowed in auto-commit mode
GridTestUtils.assertThrows(log,
assertThrows(log,
new Callable<Object>() {
@Override public Object call() throws Exception {
conn.setSavepoint(name);
Expand All @@ -279,15 +280,15 @@ public void testSetSavepointName() throws Exception {

// Unsupported
checkNotSupported(new RunnableX() {
@Override public void run() throws Exception {
@Override public void runx() throws Exception {
conn.setSavepoint(name);
}
});

conn.close();

checkConnectionClosed(new RunnableX() {
@Override public void run() throws Exception {
@Override public void runx() throws Exception {
conn.setSavepoint(name);
}
});
Expand All @@ -303,7 +304,7 @@ public void testRollbackSavePoint() throws Exception {
assert !conn.getMetaData().supportsSavepoints();

// Invalid arg
GridTestUtils.assertThrows(log,
assertThrows(log,
new Callable<Object>() {
@Override public Object call() throws Exception {
conn.rollback(null);
Expand All @@ -318,7 +319,7 @@ public void testRollbackSavePoint() throws Exception {
final Savepoint savepoint = getFakeSavepoint();

// Disallowed in auto-commit mode
GridTestUtils.assertThrows(log,
assertThrows(log,
new Callable<Object>() {
@Override public Object call() throws Exception {
conn.rollback(savepoint);
Expand All @@ -334,15 +335,15 @@ public void testRollbackSavePoint() throws Exception {

// Unsupported
checkNotSupported(new RunnableX() {
@Override public void run() throws Exception {
@Override public void runx() throws Exception {
conn.rollback(savepoint);
}
});

conn.close();

checkConnectionClosed(new RunnableX() {
@Override public void run() throws Exception {
@Override public void runx() throws Exception {
conn.rollback(savepoint);
}
});
Expand Down
Loading