You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by am...@apache.org on 2022/02/04 12:05:49 UTC

[ignite] branch sql-calcite updated: IGNITE-16460: Calcite. Fix Calcite TC test suite. (#9793)

This is an automated email from the ASF dual-hosted git repository.

amashenkov pushed a commit to branch sql-calcite
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/sql-calcite by this push:
     new 3ed308a  IGNITE-16460: Calcite. Fix Calcite TC test suite. (#9793)
3ed308a is described below

commit 3ed308a386d3977d81e990850780052a4086de37
Author: Andrew V. Mashenkov <AM...@users.noreply.github.com>
AuthorDate: Fri Feb 4 15:04:59 2022 +0300

    IGNITE-16460: Calcite. Fix Calcite TC test suite. (#9793)
---
 modules/calcite/pom.xml                            |  19 ++-
 modules/calcite/src/test/config/log4j-test.xml     | 158 ---------------------
 .../query/calcite/logical/ScriptTestRunner.java    |  16 ++-
 .../apache/ignite/testsuites/ScriptTestSuite.java  |   2 +-
 parent/pom.xml                                     |   2 +-
 5 files changed, 27 insertions(+), 170 deletions(-)

diff --git a/modules/calcite/pom.xml b/modules/calcite/pom.xml
index 19c6bd0..600be82 100644
--- a/modules/calcite/pom.xml
+++ b/modules/calcite/pom.xml
@@ -26,15 +26,16 @@
 
     <!-- Module specific package versions -->
     <properties>
+        <avatica.version>1.19.0</avatica.version>
         <calcite.version>1.29.0</calcite.version>
+        <checker.version>3.10.0</checker.version>
+        <esri.geometry.version>2.2.0</esri.geometry.version>
+        <immutables.version>2.8.2</immutables.version>
         <janino.version>3.1.6</janino.version>
-        <avatica.version>1.19.0</avatica.version>
+        <javacc-maven-plugin>2.4</javacc-maven-plugin>
+        <!--        <javassist.version>3.28.0-GA</javassist.version>-->
         <jsonpath.version>2.4.0</jsonpath.version>
         <reflections.version>0.10.2</reflections.version>
-        <javassist.version>3.28.0-GA</javassist.version>
-        <esri.geometry.version>2.2.0</esri.geometry.version>
-        <checker.version>3.10.0</checker.version>
-        <immutables.version>2.8.2</immutables.version>
     </properties>
 
     <parent>
@@ -165,6 +166,13 @@
         </dependency>
 
         <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>ignite-tools</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
             <groupId>org.springframework</groupId>
             <artifactId>spring-core</artifactId>
             <version>${spring.version}</version>
@@ -280,6 +288,7 @@
             <plugin>
                 <groupId>org.codehaus.mojo</groupId>
                 <artifactId>javacc-maven-plugin</artifactId>
+                <version>${javacc-maven-plugin}</version>
                 <executions>
                     <execution>
                         <id>javacc</id>
diff --git a/modules/calcite/src/test/config/log4j-test.xml b/modules/calcite/src/test/config/log4j-test.xml
deleted file mode 100755
index c0e49b6..0000000
--- a/modules/calcite/src/test/config/log4j-test.xml
+++ /dev/null
@@ -1,158 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
--->
-
-<!DOCTYPE log4j:configuration PUBLIC "-//APACHE//DTD LOG4J 1.2//EN"
-    "http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/xml/doc-files/log4j.dtd">
-<!--
-    Log4j configuration.
--->
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
-    <!--
-        Logs System.out messages to console.
-    -->
-    <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
-        <!-- Log to STDOUT. -->
-        <param name="Target" value="System.out"/>
-
-        <!-- Log from DEBUG and higher. -->
-        <param name="Threshold" value="DEBUG"/>
-
-        <!-- The default pattern: Date Priority [Category] Message\n -->
-        <layout class="org.apache.log4j.PatternLayout">
-            <param name="ConversionPattern" value="[%d{ISO8601}][%-5p][%t][%cc{1}] %m%n"/>
-        </layout>
-
-        <!-- Do not log beyond INFO level. -->
-        <filter class="org.apache.log4j.varia.LevelRangeFilter">
-            <param name="levelMin" value="DEBUG"/>
-            <param name="levelMax" value="INFO"/>
-        </filter>
-    </appender>
-
-    <!--
-        Logs all System.err messages to console.
-    -->
-    <appender name="CONSOLE_ERR" class="org.apache.log4j.ConsoleAppender">
-        <!-- Log to STDERR. -->
-        <param name="Target" value="System.err"/>
-
-        <!-- Log from WARN and higher. -->
-        <param name="Threshold" value="WARN"/>
-
-        <!-- The default pattern: Date Priority [Category] Message\n -->
-        <layout class="org.apache.log4j.PatternLayout">
-            <param name="ConversionPattern" value="[%d{ISO8601}][%-5p][%t][%cc{1}] %m%n"/>
-        </layout>
-    </appender>
-
-    <!--
-        Logs all output to specified file.
-    -->
-    <appender name="FILE" class="org.apache.log4j.RollingFileAppender">
-        <param name="Threshold" value="DEBUG"/>
-        <param name="File" value="${IGNITE_HOME}/work/log/ignite.log"/>
-        <param name="Append" value="true"/>
-        <param name="MaxFileSize" value="10MB"/>
-        <param name="MaxBackupIndex" value="10"/>
-        <layout class="org.apache.log4j.PatternLayout">
-            <param name="ConversionPattern" value="[%d{ISO8601}][%-5p][%t][%cc{1}] %m%n"/>
-        </layout>
-    </appender>
-
-    <!--
-        Uncomment to enable Ignite query execution debugging.
-    -->
-    <!--
-    <category name="org.apache.ignite.internal.processors.query">
-        <level value="DEBUG"/>
-    </category>
-    -->
-
-    <!--
-        Uncomment to enable Exchange, Rebalance and Partitions workflow debugging.
-    -->
-    <!--
-         <category name="org.apache.ignite.internal.processors.cache.distributed.dht.preloader">
-             <level value="DEBUG"/>
-         </category>
-
-        <category name="org.apache.ignite.internal.processors.cache.distributed.dht.topology">
-            <level value="DEBUG"/>
-        </category>
-    -->
-
-    <!--
-        Uncomment to enable debugging of partition counters.
-    -->
-    <!--
-        <category name="org.apache.ignite.internal.processors.cache.PartitionUpdateCounterDebugWrapper">
-            <level value="DEBUG"/>
-        </category>
-    -->
-
-    <!--
-        Uncomment to enable transactions debugging.
-    -->
-    <!--
-         <category name="org.apache.ignite.cache.msg.tx.prepare">
-             <level value="DEBUG"/>
-         </category>
-
-         <category name="org.apache.ignite.cache.msg.tx.finish">
-             <level value="DEBUG"/>
-         </category>
-
-         <category name="org.apache.ignite.cache.msg.tx.recovery">
-             <level value="DEBUG"/>
-         </category>
-    -->
-
-    <!--
-        Uncomment to enable debugging of partition eviction.
-    -->
-    <!--
-        <category name="org.apache.ignite.internal.processors.cache.distributed.dht.topology.PartitionsEvictManager">
-            <level value="DEBUG"/>
-        </category>
-    -->
-
-    <!-- Disable all open source debugging. -->
-<!--    <category name="org.apache.calcite">-->
-<!--        <level value="DEBUG"/>-->
-<!--    </category>-->
-
-    <category name="org">
-        <level value="INFO"/>
-    </category>
-
-    <category name="org.eclipse.jetty">
-        <level value="INFO"/>
-    </category>
-
-    <!-- Default settings. -->
-    <root>
-        <!-- Print at info by default. -->
-        <level value="INFO"/>
-
-        <!-- Append to file and console. -->
-        <appender-ref ref="FILE"/>
-        <appender-ref ref="CONSOLE"/>
-        <appender-ref ref="CONSOLE_ERR"/>
-    </root>
-</log4j:configuration>
diff --git a/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/logical/ScriptTestRunner.java b/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/logical/ScriptTestRunner.java
index 646ecc1..de10599 100644
--- a/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/logical/ScriptTestRunner.java
+++ b/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/logical/ScriptTestRunner.java
@@ -61,10 +61,10 @@ public class ScriptTestRunner extends Runner {
 
     static {
         try {
-            log = new GridTestLog4jLogger("src/test/config/log4j-test.xml");
+            log = new GridTestLog4jLogger(U.resolveIgnitePath("modules/core/src/test/config/log4j-test.xml"));
         }
         catch (Exception e) {
-            e.printStackTrace();
+            e.printStackTrace(System.err);
 
             log = null;
 
@@ -98,7 +98,7 @@ public class ScriptTestRunner extends Runner {
         assert !F.isEmpty(env.scriptsRoot());
 
         nodes = env.nodes();
-        scriptsRoot = FS.getPath(env.scriptsRoot());
+        scriptsRoot = FS.getPath(U.resolveIgnitePath(env.scriptsRoot()).getPath());
         testRegex = F.isEmpty(env.regex()) ? null : Pattern.compile(env.regex());
         restartCluster = env.restart();
         timeout = env.timeout();
@@ -147,6 +147,14 @@ public class ScriptTestRunner extends Runner {
 
         String fileName = test.getFileName().toString();
 
+        Description desc = Description.createTestDescription(dirName, fileName);
+
+        if (fileName.endsWith(".test_ignore")) {
+            notifier.fireTestIgnored(desc);
+
+            return;
+        }
+
         if (
             (!fileName.endsWith(".test") && !fileName.endsWith(".test_slow") && testRegex == null)
                 || (testRegex != null && !testRegex.matcher(test.toString()).find())
@@ -155,8 +163,6 @@ public class ScriptTestRunner extends Runner {
 
         beforeTest();
 
-        Description desc = Description.createTestDescription(dirName, fileName);
-
         notifier.fireTestStarted(desc);
 
         try {
diff --git a/modules/calcite/src/test/java/org/apache/ignite/testsuites/ScriptTestSuite.java b/modules/calcite/src/test/java/org/apache/ignite/testsuites/ScriptTestSuite.java
index 4764a3e..fbed008 100644
--- a/modules/calcite/src/test/java/org/apache/ignite/testsuites/ScriptTestSuite.java
+++ b/modules/calcite/src/test/java/org/apache/ignite/testsuites/ScriptTestSuite.java
@@ -72,6 +72,6 @@ import org.junit.runner.RunWith;
  *
  */
 @RunWith(ScriptTestRunner.class)
-@ScriptRunnerTestsEnvironment(scriptsRoot = "src/test/sql/", timeout = 180000)
+@ScriptRunnerTestsEnvironment(scriptsRoot = "modules/calcite/src/test/sql", timeout = 180000)
 public class ScriptTestSuite {
 }
diff --git a/parent/pom.xml b/parent/pom.xml
index a9f1689..4f90ee8 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -81,7 +81,7 @@
         <jackson1.version>1.9.13</jackson1.version>
         <jaxb.api.version>2.1</jaxb.api.version>
         <jaxb.impl.version>2.1.14</jaxb.impl.version>
-        <javassist.version>3.20.0-GA</javassist.version>
+        <javassist.version>3.28.0-GA</javassist.version>
         <javax.cache.bundle.version>1.0.0_1</javax.cache.bundle.version>
         <javax.cache.tck.version>1.1.0</javax.cache.tck.version>
         <javax.cache.version>1.0.0</javax.cache.version>