Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
134 commits
Select commit Hold shift + click to select a range
e13d560
Enable quidem shadowing for decoupled testcases
kgyrtkirk May 10, 2024
e36c46a
fix import
kgyrtkirk May 13, 2024
3132c12
remove unnecessary \\
kgyrtkirk May 14, 2024
9578953
Merge remote-tracking branch 'apache/master' into quidem-runner-exten…
kgyrtkirk May 14, 2024
b7b73fa
fix context key order
kgyrtkirk May 14, 2024
3fbb3cb
add
kgyrtkirk May 14, 2024
43fd8af
Revert "add"
kgyrtkirk May 14, 2024
a16f982
remove crap
kgyrtkirk May 14, 2024
7301126
triaks
kgyrtkirk May 15, 2024
d4b052a
stuff
kgyrtkirk May 15, 2024
8ee41f5
it does work
kgyrtkirk May 15, 2024
55b2051
workinhg stuff
kgyrtkirk May 15, 2024
074161d
add some service crap
kgyrtkirk May 16, 2024
5f552a2
c
kgyrtkirk May 16, 2024
4a47b02
no roles
kgyrtkirk May 16, 2024
7e10df1
...
kgyrtkirk May 16, 2024
c9638b7
update
kgyrtkirk May 16, 2024
cab3d94
up
kgyrtkirk May 16, 2024
27735f2
move disco
kgyrtkirk May 16, 2024
28ea884
almost ready?
kgyrtkirk May 16, 2024
118eb61
there - with 1 boot
kgyrtkirk May 16, 2024
b63a80e
passes basic test
kgyrtkirk May 16, 2024
93892b6
undo some
kgyrtkirk May 16, 2024
688611e
undo
kgyrtkirk May 16, 2024
bec1f38
move sqlmodule down
kgyrtkirk May 16, 2024
3658ab2
remove f
kgyrtkirk May 16, 2024
607ef17
indent
kgyrtkirk May 16, 2024
59be71c
add other
kgyrtkirk May 16, 2024
f4c73e1
make old defaults to overides
kgyrtkirk May 16, 2024
e2986ae
cleanup
kgyrtkirk May 16, 2024
76ffbfb
cl
kgyrtkirk May 16, 2024
1fb9fac
remove cl
kgyrtkirk May 16, 2024
1d2a79f
cleanup
kgyrtkirk May 16, 2024
cabf2a3
fix
kgyrtkirk May 16, 2024
fc9a6c7
move/etc
kgyrtkirk May 16, 2024
e7e119b
reduce copypaste
kgyrtkirk May 16, 2024
94f9386
Merge remote-tracking branch 'apache/master' into quidem-runner-exten…
kgyrtkirk May 16, 2024
652cc20
use lower_camel for config names
kgyrtkirk May 17, 2024
453c11f
update exceptions;test output
kgyrtkirk May 17, 2024
ecdcd0f
Merge remote-tracking branch 'apache/master' into quidem-runner-exten…
kgyrtkirk May 21, 2024
ad64784
fix test expectation
kgyrtkirk May 21, 2024
52598d3
some stuff
kgyrtkirk May 21, 2024
08b73d1
Revert "some stuff"
kgyrtkirk May 21, 2024
ba09e7d
add
kgyrtkirk May 21, 2024
4595b0c
u[pdate
kgyrtkirk May 21, 2024
e4ca09d
Merge remote-tracking branch 'apache/master' into quidem-runner-exten…
kgyrtkirk May 22, 2024
206363c
Merge remote-tracking branch 'apache/master' into quidem-runner-exten…
kgyrtkirk May 27, 2024
ec2ecde
updates
kgyrtkirk May 27, 2024
9ae80f0
Merge remote-tracking branch 'kgyrtkirk/quidem-runner-extension-submi…
kgyrtkirk May 27, 2024
b20ee99
clean
kgyrtkirk May 28, 2024
a1b7f98
cleanup
kgyrtkirk May 28, 2024
ee19571
inline class
kgyrtkirk May 28, 2024
6c264f2
move stuff
kgyrtkirk May 28, 2024
a713b66
undo
kgyrtkirk May 28, 2024
ff31c14
clkeaup
kgyrtkirk May 28, 2024
07e05a6
cleasnup
kgyrtkirk May 28, 2024
295c09a
launcher-x
kgyrtkirk May 28, 2024
ff7abeb
small cleanup
kgyrtkirk May 28, 2024
88da8d9
rename
kgyrtkirk May 28, 2024
d1b4587
uu
kgyrtkirk May 28, 2024
fb4b32e
updates
kgyrtkirk May 29, 2024
90c88ae
some pom
kgyrtkirk Jun 4, 2024
d75dcea
undo integration-tests module changes
kgyrtkirk Jun 10, 2024
0bcfec4
trial
kgyrtkirk Jun 10, 2024
2fbd7fe
add
kgyrtkirk Jun 11, 2024
298a470
try w/o upgrade guice
kgyrtkirk Jun 11, 2024
002c305
make test indep from java11
kgyrtkirk Jun 11, 2024
6c6053e
cleanup
kgyrtkirk Jun 11, 2024
7a65938
use druidhook instead Hook
kgyrtkirk Jun 11, 2024
47696a6
updates
kgyrtkirk Jun 17, 2024
a995229
cleanup
kgyrtkirk Jun 17, 2024
e06e546
fix style; emitter
kgyrtkirk Jun 17, 2024
7eccf5b
add some validation/etc
kgyrtkirk Jun 17, 2024
f5720ce
u
kgyrtkirk Jun 17, 2024
6dd62fb
updates
kgyrtkirk Jun 17, 2024
e815914
update/etc
kgyrtkirk Jun 18, 2024
75c578a
cleanup
kgyrtkirk Jun 18, 2024
0366192
updates
kgyrtkirk Jun 18, 2024
9df6f33
add test-jar ref
kgyrtkirk Jun 18, 2024
e725df7
fix loader
kgyrtkirk Jun 18, 2024
475f5b5
cleanup
kgyrtkirk Jun 18, 2024
74c4886
cleanup
kgyrtkirk Jun 18, 2024
d14b737
add
kgyrtkirk Jun 18, 2024
64a971f
fix autostart
kgyrtkirk Jun 18, 2024
dffa331
updates/etc
kgyrtkirk Jun 18, 2024
61dd670
remove not needed
kgyrtkirk Jun 18, 2024
fdf1159
disable record by default
kgyrtkirk Jun 18, 2024
1a0ab2c
Merge remote-tracking branch 'apache/master' into quidem-record
kgyrtkirk Jun 19, 2024
4bd8039
fix delegate
kgyrtkirk Jun 19, 2024
eda4849
add kttm tx
kgyrtkirk Jun 20, 2024
b2be5ab
fix md
kgyrtkirk Jun 20, 2024
604910c
cleanup
kgyrtkirk Jun 20, 2024
ebb27cf
add extension to disabel when not sql compat
kgyrtkirk Jun 20, 2024
6e48cb8
move annotation
kgyrtkirk Jun 20, 2024
d329686
fix msq test
kgyrtkirk Jun 20, 2024
82f24e6
Revert "add kttm tx"
kgyrtkirk Jun 20, 2024
26a16fb
Revert "Revert "add kttm tx""
kgyrtkirk Jun 20, 2024
7242123
close stuff
kgyrtkirk Jun 20, 2024
cefdf96
prep
kgyrtkirk Jun 20, 2024
0af3b91
update readme
kgyrtkirk Jun 20, 2024
9a4d04a
Revert "Revert "Revert "add kttm tx"""
kgyrtkirk Jun 20, 2024
0d76a73
remove final
kgyrtkirk Jun 25, 2024
6c02cbd
fixes
kgyrtkirk Jun 25, 2024
3dfe5c4
add reflections
kgyrtkirk Jun 25, 2024
1a5faf1
more pomxml stuff
kgyrtkirk Jun 25, 2024
1b7dd8f
stuff
kgyrtkirk Jun 26, 2024
e7141e2
Revert "stuff"
kgyrtkirk Jun 26, 2024
c559bc3
Revert "Revert "Revert "Revert "add kttm tx""""
kgyrtkirk Jun 26, 2024
b899243
x
kgyrtkirk Jun 26, 2024
cc4e0ad
make synch
kgyrtkirk Jun 26, 2024
20c543d
Revert "Revert "Revert "Revert "Revert "add kttm tx"""""
kgyrtkirk Jun 26, 2024
2a590eb
Merge commit 'apache/master^^^' into quidem-record
kgyrtkirk Jul 17, 2024
82436df
fix test;disable dep-check for module
kgyrtkirk Jul 17, 2024
06b68b6
Merge remote-tracking branch 'apache/master' into quidem-record
kgyrtkirk Jul 18, 2024
e388140
Apply suggestions from code review
asdf2014 Jul 18, 2024
76ff3f2
add supress
kgyrtkirk Jul 18, 2024
d216b93
Merge remote-tracking branch 'kgyrtkirk/quidem-record' into quidem-re…
kgyrtkirk Jul 18, 2024
e2a54b5
update
kgyrtkirk Jul 19, 2024
b38935a
add test; fb
kgyrtkirk Jul 19, 2024
f7247e1
use entryset
kgyrtkirk Jul 19, 2024
d227029
undo unrealted change
kgyrtkirk Jul 19, 2024
ce667ee
move stuff around / prepare to unglobalize
kgyrtkirk Jul 30, 2024
f6cc540
use druidhookdispatcherr#1
kgyrtkirk Jul 30, 2024
78b75d3
move more to non-static
kgyrtkirk Jul 30, 2024
9ac26e3
wire-in hookdispatcher thru connection/etc
kgyrtkirk Jul 30, 2024
df42245
add apidoc/etc
kgyrtkirk Jul 30, 2024
b345dd9
updates/fix style/etc
kgyrtkirk Jul 30, 2024
7f99ee2
fix copy-pasted crap
kgyrtkirk Jul 30, 2024
5798006
rename module
kgyrtkirk Jul 30, 2024
eb2a047
Merge remote-tracking branch 'apache/master' into quidem-record
kgyrtkirk Jul 30, 2024
ca121aa
remove firehose
kgyrtkirk Jul 30, 2024
a03fb49
remove exception
kgyrtkirk Jul 30, 2024
e6add9e
Merge remote-tracking branch 'apache/master' into quidem-record
kgyrtkirk Aug 5, 2024
bb23ace
builtintypes instead nesteddata
kgyrtkirk Aug 5, 2024
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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ README
.pmdruleset.xml
.java-version
integration-tests/gen-scripts/
/bin/
**/bin/
*.hprof
**/.ipynb_checkpoints/
website/.yarn/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
import org.apache.druid.sql.calcite.run.SqlEngine;
import org.apache.druid.sql.calcite.schema.DruidSchemaCatalog;
import org.apache.druid.sql.calcite.util.CalciteTests;
import org.apache.druid.sql.hook.DruidHookDispatcher;
import org.apache.druid.timeline.DataSegment;
import org.apache.druid.timeline.partition.LinearShardSpec;
import org.openjdk.jmh.annotations.Benchmark;
Expand Down Expand Up @@ -202,7 +203,8 @@ public void setup() throws JsonProcessingException
new CalciteRulesManager(ImmutableSet.of()),
CalciteTests.createJoinableFactoryWrapper(),
CatalogResolver.NULL_RESOLVER,
new AuthConfig()
new AuthConfig(),
new DruidHookDispatcher()
);

String prefix = ("explain plan for select long1 from foo where long1 in ");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
import org.apache.druid.sql.calcite.util.LookylooModule;
import org.apache.druid.sql.calcite.util.QueryFrameworkUtils;
import org.apache.druid.sql.calcite.util.testoperator.CalciteTestOperatorModule;
import org.apache.druid.sql.hook.DruidHookDispatcher;
import org.apache.druid.timeline.DataSegment;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
Expand Down Expand Up @@ -674,7 +675,8 @@ public static Pair<PlannerFactory, SqlEngine> createSqlSystem(
new CalciteRulesManager(ImmutableSet.of()),
new JoinableFactoryWrapper(QueryFrameworkUtils.createDefaultJoinableFactory(injector)),
CatalogResolver.NULL_RESOLVER,
new AuthConfig()
new AuthConfig(),
new DruidHookDispatcher()
);

return Pair.of(plannerFactory, engine);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
import org.apache.druid.sql.calcite.run.SqlEngine;
import org.apache.druid.sql.calcite.schema.DruidSchemaCatalog;
import org.apache.druid.sql.calcite.util.CalciteTests;
import org.apache.druid.sql.hook.DruidHookDispatcher;
import org.apache.druid.timeline.DataSegment;
import org.apache.druid.timeline.partition.LinearShardSpec;
import org.openjdk.jmh.annotations.Benchmark;
Expand Down Expand Up @@ -364,7 +365,8 @@ public void setup()
new CalciteRulesManager(ImmutableSet.of()),
CalciteTests.createJoinableFactoryWrapper(),
CatalogResolver.NULL_RESOLVER,
new AuthConfig()
new AuthConfig(),
new DruidHookDispatcher()
);

try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
import org.apache.druid.sql.calcite.run.SqlEngine;
import org.apache.druid.sql.calcite.schema.DruidSchemaCatalog;
import org.apache.druid.sql.calcite.util.CalciteTests;
import org.apache.druid.sql.hook.DruidHookDispatcher;
import org.apache.druid.timeline.DataSegment;
import org.apache.druid.timeline.partition.LinearShardSpec;
import org.openjdk.jmh.annotations.Benchmark;
Expand Down Expand Up @@ -347,7 +348,8 @@ public void setup()
new CalciteRulesManager(ImmutableSet.of()),
CalciteTests.createJoinableFactoryWrapper(),
CatalogResolver.NULL_RESOLVER,
new AuthConfig()
new AuthConfig(),
new DruidHookDispatcher()
);

try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
import org.apache.druid.sql.calcite.run.SqlEngine;
import org.apache.druid.sql.calcite.schema.DruidSchemaCatalog;
import org.apache.druid.sql.calcite.util.CalciteTests;
import org.apache.druid.sql.hook.DruidHookDispatcher;
import org.apache.druid.timeline.DataSegment;
import org.apache.druid.timeline.partition.LinearShardSpec;
import org.openjdk.jmh.annotations.Benchmark;
Expand Down Expand Up @@ -402,7 +403,8 @@ public void setup()
new CalciteRulesManager(ImmutableSet.of()),
CalciteTests.createJoinableFactoryWrapper(),
CatalogResolver.NULL_RESOLVER,
new AuthConfig()
new AuthConfig(),
new DruidHookDispatcher()
);

try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
import org.apache.druid.sql.calcite.run.SqlEngine;
import org.apache.druid.sql.calcite.schema.DruidSchemaCatalog;
import org.apache.druid.sql.calcite.util.CalciteTests;
import org.apache.druid.sql.hook.DruidHookDispatcher;
import org.apache.druid.timeline.DataSegment;
import org.apache.druid.timeline.partition.LinearShardSpec;
import org.openjdk.jmh.annotations.Benchmark;
Expand Down Expand Up @@ -132,7 +133,8 @@ public void setup()
new CalciteRulesManager(ImmutableSet.of()),
CalciteTests.createJoinableFactoryWrapper(),
CatalogResolver.NULL_RESOLVER,
new AuthConfig()
new AuthConfig(),
new DruidHookDispatcher()
);
groupByQuery = GroupByQuery
.builder()
Expand Down
4 changes: 2 additions & 2 deletions dev/quidem
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ OPTS+=" -Dsurefire.rerunFailingTestsCount=0"
OPTS+=" -Dorg.slf4j.simpleLogger.log.org.apache.maven.plugin.surefire.SurefirePlugin=INFO"
[[ $@ =~ "-q" ]] && OPTS+=" -Dsurefire.trimStackTrace=true"

OPTS+=" -pl sql -Dtest=SqlQuidemTest"
OPTS+=" -pl quidem-ut -Dtest=QTest"
OPTS+=" org.apache.maven.plugins:maven-surefire-plugin:test"

case "$1" in
-h|--help)
cat << EOF
Run SqlQuidemTest tests.
Run QTest tests.
-q quiet (recommened)
-Dquidem.overwrite enables overwrite mode
-Dquidem.filter=*join* runs only tests matching path expression
Expand Down
5 changes: 5 additions & 0 deletions extensions-contrib/compressed-bigdecimal/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,11 @@
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
</dependency>
<dependency>
<groupId>org.reflections</groupId>
<artifactId>reflections</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
5 changes: 5 additions & 0 deletions extensions-contrib/tdigestsketch/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,11 @@
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.reflections</groupId>
<artifactId>reflections</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
Expand Down
5 changes: 5 additions & 0 deletions extensions-core/datasketches/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,11 @@
<artifactId>junit-jupiter-params</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.reflections</groupId>
<artifactId>reflections</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
Expand Down
5 changes: 5 additions & 0 deletions extensions-core/druid-bloom-filter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,11 @@
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.reflections</groupId>
<artifactId>reflections</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.druid</groupId>
<artifactId>druid-processing</artifactId>
Expand Down
5 changes: 5 additions & 0 deletions extensions-core/druid-catalog/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,11 @@
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.reflections</groupId>
<artifactId>reflections</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
Expand Down
5 changes: 5 additions & 0 deletions extensions-core/histogram/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.reflections</groupId>
<artifactId>reflections</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.druid</groupId>
<artifactId>druid-processing</artifactId>
Expand Down
5 changes: 5 additions & 0 deletions extensions-core/multi-stage-query/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,11 @@
<artifactId>junit-jupiter-params</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.reflections</groupId>
<artifactId>reflections</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
import org.apache.druid.sql.calcite.schema.NamedViewSchema;
import org.apache.druid.sql.calcite.schema.ViewSchema;
import org.apache.druid.sql.calcite.util.CalciteTests;
import org.apache.druid.sql.hook.DruidHookDispatcher;
import org.easymock.EasyMock;
import org.junit.Assert;
import org.junit.Before;
Expand Down Expand Up @@ -75,7 +76,8 @@ NamedViewSchema.NAME, new NamedViewSchema(EasyMock.createMock(ViewSchema.class))
"druid",
new CalciteRulesManager(ImmutableSet.of()),
CalciteTests.TEST_AUTHORIZER_MAPPER,
AuthConfig.newBuilder().build()
AuthConfig.newBuilder().build(),
new DruidHookDispatcher()
);
final NativeSqlEngine engine = CalciteTests.createMockSqlEngine(
EasyMock.createMock(QuerySegmentWalker.class),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@
import org.apache.druid.sql.calcite.util.TestDataBuilder;
import org.apache.druid.sql.calcite.view.InProcessViewManager;
import org.apache.druid.sql.guice.SqlBindings;
import org.apache.druid.sql.hook.DruidHookDispatcher;
import org.apache.druid.storage.StorageConfig;
import org.apache.druid.storage.StorageConnector;
import org.apache.druid.storage.StorageConnectorModule;
Expand Down Expand Up @@ -562,7 +563,8 @@ public String getFormatString()
new CalciteRulesManager(ImmutableSet.of()),
CalciteTests.createJoinableFactoryWrapper(),
catalogResolver,
new AuthConfig()
new AuthConfig(),
new DruidHookDispatcher()
);

sqlStatementFactory = CalciteTests.createSqlStatementFactory(engine, plannerFactory);
Expand Down
6 changes: 5 additions & 1 deletion extensions-core/stats/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,11 @@
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.reflections</groupId>
<artifactId>reflections</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.druid</groupId>
<artifactId>druid-processing</artifactId>
Expand Down
5 changes: 5 additions & 0 deletions extensions-core/testing-tools/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,11 @@
<artifactId>junit-jupiter-params</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.reflections</groupId>
<artifactId>reflections</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@
<module>integration-tests-ex/tools</module>
<module>integration-tests-ex/image</module>
<module>integration-tests-ex/cases</module>
<module>quidem-ut</module>
</modules>

<repositories>
Expand Down
74 changes: 74 additions & 0 deletions quidem-ut/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
<!--
~ 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.
-->

# Quidem UT

Enables to write sql level tests easily.
Can be used to write tests against existing test backends (ComponentSupplier) - by doing so the testcases can be moved closer to the excercised codes.

## Usage

### Install java&maven (if needed)

If you don't have java&maven - one way to set that up is by using sdkman like this:
```bash
# install sdkman
curl -s "https://get.sdkman.io" | bash
# at the end of installation either open a new terminal; or follow the instructions at the end

# install java&maven
sdk install java 11.0.23-zulu
sdk install maven

# run mvn to see if it works
mvn --version

# download druid sourcces (FIXME: change this to the main repo/branch before merging)
git clone --branch quidem-record https://github.com/kgyrtkirk/druid
```




### Running these tests

* CI execution happens by a standard JUnit test `QTest` in this module
* the `dev/quidem` script can be used to run these tests (after the project is built)

### Launching a test generating broker

* make sure to build the project first; one way to do that is:
```bash
mvn install -pl quidem-ut/ -am -DskipTests -Pskip-static-checks
```
* launch the broker instance with:
```bash
mvn exec:exec -pl quidem-ut -Dquidem.record.autostart=true
```
* the broker will be running at http://localhost:12345
* the used test configuration backend can configured by supplying `quidem.uri`
```bash
mvn exec:exec -pl quidem-ut -Dquidem.uri=druidtest:///?componentSupplier=ThetaSketchComponentSupplier
```
* new record files can be started by calling http://localhost:12345/quidem/start
* if `quidem.record.autostart` is omitted recording will not start
* after finished with the usage of the broker ; a new `record-123.iq` file will be in the project's worktree - it will contain all the executed statements
* running `dev/quidem -Dquidem.overwrite` updates the resultsets of all `iq` files around there
* rename the testfile to have a more descriptive name

Loading