mirror of https://github.com/apache/druid.git
parent
34651e70e5
commit
3e2b59f808
|
@ -1,37 +0,0 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
package org.apache.druid.msq.quidem;
|
||||
|
||||
import org.apache.druid.quidem.SharedQuidemTest;
|
||||
|
||||
public class MSQSharedQuidemTest extends SharedQuidemTest
|
||||
{
|
||||
|
||||
public MSQSharedQuidemTest()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isNative()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -49,7 +49,6 @@ import java.io.Writer;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.function.Function;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.fail;
|
||||
|
||||
|
@ -108,7 +107,7 @@ public abstract class DruidQuidemTestBase
|
|||
}
|
||||
filter = new WildcardFileFilter(filterStr);
|
||||
}
|
||||
druidQuidemRunner = new DruidQuidemRunner(this::getEnv);
|
||||
druidQuidemRunner = new DruidQuidemRunner();
|
||||
}
|
||||
|
||||
/** Creates a command handler. */
|
||||
|
@ -129,11 +128,8 @@ public abstract class DruidQuidemTestBase
|
|||
|
||||
public static class DruidQuidemRunner
|
||||
{
|
||||
private final Function<String, Object> envFunction;
|
||||
|
||||
public DruidQuidemRunner(Function<String, Object> envFunction)
|
||||
public DruidQuidemRunner()
|
||||
{
|
||||
this.envFunction = envFunction;
|
||||
}
|
||||
|
||||
public void run(File inFile) throws Exception
|
||||
|
@ -153,7 +149,7 @@ public abstract class DruidQuidemTestBase
|
|||
ConfigBuilder configBuilder = Quidem.configBuilder()
|
||||
.withConnectionFactory(connectionFactory)
|
||||
.withPropertyHandler(connectionFactory)
|
||||
.withEnv(envFunction)
|
||||
.withEnv(connectionFactory::getEnv)
|
||||
.withCommandHandler(new DruidQuidemCommandHandler());
|
||||
|
||||
Config config = configBuilder
|
||||
|
@ -220,9 +216,4 @@ public abstract class DruidQuidemTestBase
|
|||
{
|
||||
DruidAvaticaTestDriver.CONFIG_STORE.close();
|
||||
}
|
||||
|
||||
protected Object getEnv(String name)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,54 +0,0 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
package org.apache.druid.quidem;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class SharedQuidemTest extends DruidQuidemTestBase
|
||||
{
|
||||
public SharedQuidemTest()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final File getTestRoot()
|
||||
{
|
||||
return ProjectPathUtils.getPathFromProjectRoot("sql/src/test/quidem/" + SharedQuidemTest.class.getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final Object getEnv(String name)
|
||||
{
|
||||
if (name.equals("isMSQ")) {
|
||||
return !isNative();
|
||||
}
|
||||
if (name.equals("isNative")) {
|
||||
return isNative();
|
||||
}
|
||||
return super.getEnv(name);
|
||||
}
|
||||
|
||||
protected boolean isNative()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -69,7 +69,7 @@ public class QTestCase
|
|||
isValidTestCaseFile(testInfo.getIQFile());
|
||||
}
|
||||
|
||||
DruidQuidemRunner runner = new DruidQuidemTestBase.DruidQuidemRunner(name -> null);
|
||||
DruidQuidemRunner runner = new DruidQuidemTestBase.DruidQuidemRunner();
|
||||
runner.run(testInfo.getIQFile());
|
||||
}
|
||||
catch (Exception e) {
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
!set plannerStrategy DECOUPLED
|
||||
isMSQ false
|
||||
!show isMSQ
|
||||
|
||||
!if (isMSQ) {
|
||||
!use druidtest://?componentSupplier=DrillWindowQueryMSQComponentSupplier
|
||||
!}
|
||||
!if (isNative) {
|
||||
!use druidtest://?numMergeBuffers=3
|
||||
!}
|
||||
|
||||
select 1+1;
|
||||
|
||||
!nativePlan
|
||||
|
||||
!if (isMSQ) {
|
||||
!msqPlan
|
||||
!}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue