zstan commented on code in PR #13602:
URL: https://github.com/apache/ignite/pull/13602#discussion_r4132424359
##########
modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/planner/PlannerTimeoutTest.java:
##########
@@ -33,13 +33,24 @@
import org.apache.ignite.internal.processors.query.calcite.schema.IgniteSchema;
import
org.apache.ignite.internal.processors.query.calcite.trait.IgniteDistributions;
import org.apache.ignite.internal.processors.query.calcite.trait.TraitUtils;
+import org.apache.ignite.internal.util.CommonUtils;
import org.apache.ignite.testframework.GridTestUtils;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Order;
+import org.junit.jupiter.api.Test;
/**
* Test planner timeout.
*/
+@Order(1)
public class PlannerTimeoutTest extends AbstractPlannerTest {
+ /** */
+ @BeforeAll
+ static void init() {
+ // Additional check for val correctness:
GridTestClockTimer#startTestTimer
+ assertEquals(1, (int)GridTestUtils.getFieldValue(CommonUtils.class,
"gridCnt"));
Review Comment:
Ok, I give you a clue ) Due to changed tests execution order (between junit4
and 5) and due to (possible) bug. I obtain the problem with PlannerTimeoutTest,
to reproduce it you need just to comment (it was probably bug but its hard to
find) :
ScriptTestSuite ->
```
@AfterAll
public static void tearDown() {
//IgnitionEx.stopAll(true, null);
}
```
then modify for speed up :
```
@Suite
@SelectClasses({
//TestSuiteDeclarationArchTest.class,
PlannerTestSuite.class,
//ExecutionTestSuite.class,
//JdbcTestSuite.class,
ScriptTestSuite.class,
})
public class IgniteCalciteTestSuite2 {
}
```
and, also for speed up:
```
@ScriptRunnerTestsEnvironment(scriptsRoot = "modules/calcite/src/test/sql",
timeout = 180000, regex = "limit")
public class ScriptTestSuite {
```
and you obtain PlannerTimeoutTest failure (also comment)
```
public class PlannerTimeoutTest extends AbstractPlannerTest {
/** */
@BeforeAll
static void init() {
// Additional check for val correctness:
GridTestClockTimer#startTestTimer
assertEquals(1, (int)GridTestUtils.getFieldValue(CommonUtils.class,
"gridCnt")); <--- comment !! or remove
}
```
and such a case is very hard to debug, Its all about U.currentTimeMillis()
updates, if forgot to call:
`IgnitionEx.stopAll(true, null);`
It will be never updates in further tests
--
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]