ibessonov commented on a change in pull request #9223:
URL: https://github.com/apache/ignite/pull/9223#discussion_r664300423
##########
File path:
modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/AbstractRebuildIndexTest.java
##########
@@ -295,4 +297,40 @@ protected IndexBuildStatusStorage
indexBuildStatusStorage(IgniteEx n) {
protected ConcurrentMap<String, IndexBuildStatusHolder> statuses(IgniteEx
n) {
return getFieldValue(indexBuildStatusStorage(n), "statuses");
}
+
+ /**
+ * Creation of a new index for the cache of {@link Person}.
+ * SQL: CREATE INDEX " + idxName + " ON Person(name)
+ *
+ * @param cache Cache.
+ * @param idxName Index name.
+ * @return Index creation result.
+ */
+ protected List<List<?>> createIdx(IgniteCache<Integer, Person> cache,
String idxName) {
+ String sql = "CREATE INDEX " + idxName + " ON Person(name)";
+
+ return cache.query(new SqlFieldsQuery(sql)).getAll();
+ }
+
+ /**
+ * Enable checkpoints.
+ *
+ * @param n Node.
+ * @param reason Reason for checkpoint wakeup if it would be required.
+ * @param enable Enable/disable.
+ */
+ protected Void enableCheckpoints(IgniteEx n, String reason, boolean
enable) throws Exception {
+ if (enable) {
+ dbMgr(n).enableCheckpoints(true).get(getTestTimeout());
+
+ forceCheckpoint(F.asList(n), reason);
+ }
+ else {
+ forceCheckpoint(F.asList(n), reason);
+
+ dbMgr(n).enableCheckpoints(false).get(getTestTimeout());
Review comment:
getTestTimeout() is 5 minutes. I thought 10 seconds would be enough to
detect failure. Maybe 20 =)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]