Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
8a45022
add a README describing the e2e tests
vogievetsky Oct 8, 2026
4c8cfe6
add a temporary plan for improving the e2e tests
vogievetsky Oct 8, 2026
d67ba55
move the e2e tests to the Playwright test runner and locators
vogievetsky Oct 8, 2026
2d8b9d5
check the cluster state in the e2e tests through SQL, not table columns
vogievetsky Oct 8, 2026
9eae484
let table filters in the URL hold any value
vogievetsky Oct 8, 2026
217d550
filter the e2e tests' views on the exact datasource name
vogievetsky Oct 8, 2026
fd7513d
submit the e2e tests' setup tasks through the API
vogievetsky Oct 8, 2026
2b9c7e7
encode ^ and | in URL paths
vogievetsky Oct 8, 2026
d718d51
delete the datasources an e2e test created when it passes
vogievetsky Oct 8, 2026
c8c7600
simplify the e2e page objects and their data
vogievetsky Oct 8, 2026
2fa748d
run the web console e2e specs on embedded clusters
vogievetsky Oct 8, 2026
3b016d1
add a web console e2e test that loads data from S3
vogievetsky Oct 8, 2026
346d74b
run the web console e2e tests on embedded clusters in CI
vogievetsky Oct 8, 2026
3b68a40
move the web console e2e tests next to the embedded tests of their fu…
vogievetsky Oct 8, 2026
b587518
skip the e2e datasource cleanup on embedded clusters, check that ever…
vogievetsky Oct 8, 2026
152ef0c
show the steps of the e2e tests as screenshots with E2E_SHOW_STEPS=true
vogievetsky Oct 8, 2026
545ec78
list the console e2e coverage to add in the plan
vogievetsky Oct 9, 2026
641c6ce
add a web console e2e test of the data loader's input formats
vogievetsky Oct 9, 2026
3e55e76
add a web console e2e test of Kafka ingestion and the Supervisors view
vogievetsky Oct 9, 2026
5d4097c
add a web console e2e test of SQL-based ingestion
vogievetsky Oct 9, 2026
2ad3a7f
add a web console e2e test of the Datasources view's destructive actions
vogievetsky Oct 9, 2026
c7a8326
add web console e2e tests of retention rules and JDBC lookups
vogievetsky Oct 9, 2026
36e60e5
add a web console e2e test of Dart
vogievetsky Oct 9, 2026
79af9c0
delete the e2e betterment plan
vogievetsky Oct 9, 2026
9a4bc19
close the data file in KafkaWebConsoleTest even when reading its gzip…
vogievetsky Oct 9, 2026
97edd15
DO NOT MERGE: rename the SQL data loader's Start loading data button,…
vogievetsky Oct 10, 2026
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
16 changes: 7 additions & 9 deletions .github/scripts/web-checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ set -x

# Install node.js via maven frontend plugin (same approach as jacoco script)
./mvnw -B com.github.eirslett:frontend-maven-plugin:install-node-and-npm@install-node-and-npm -pl web-console/
PATH+=:web-console/target/node/
# Absolute, as the web console end-to-end tests run npx from another directory
PATH+=:$(pwd)/web-console/target/node/

# docs
(cd website && npm ci)
Expand All @@ -30,12 +31,9 @@ npm run link-lint
npm run spellcheck
cd ..

# web console
./mvnw -B test -pl 'web-console'
# web console (installed with the console built, for the Router of the end-to-end tests to serve)
./mvnw -B install -pl 'web-console'

# web console end-to-end test
./.github/scripts/setup_generate_license.sh
web-console/script/druid build
web-console/script/druid start
(cd web-console && npm run test-e2e)
web-console/script/druid stop
# web console end-to-end tests, on embedded clusters (builds the modules embedded-tests needs, not web-console again)
./mvnw -B verify -pl 'embedded-tests,!web-console' -am -Pweb-console-tests,skip-static-checks -DskipUTs \
-Dmaven.javadoc.skip=true -Danimal.sniffer.skip=true -Denforcer.skip=true -Dcyclonedx.skip=true
3 changes: 2 additions & 1 deletion .github/workflows/worker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,5 @@ jobs:
**/TEST-*.xml
**/target/jacoco*.exec
**/target/ci-debug/**
distribution/target/apache-druid-*/log/**
embedded-tests/target/failsafe-reports/**
web-console/test-results/**
58 changes: 56 additions & 2 deletions embedded-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -890,12 +890,12 @@
<skip>true</skip>
</configuration>
</plugin>
<!-- Do not run Docker tests except with the docker-tests profile -->
<!-- Do not run Docker tests or web console tests except with the docker-tests or web-console-tests profile -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludedGroups>docker-test,perf</excludedGroups>
<excludedGroups>docker-test,web-console,perf</excludedGroups>
<!-- Enable Netty 4 PARANOID leak detection in the embedded tests because this is where
real cross-node HTTP traffic exercises the migrated HttpClient code paths (chunked
responses, long-poll syncs, TLS, ByteBuf-bearing handlers). The Stage 1 CI workers
Expand Down Expand Up @@ -970,5 +970,59 @@
</plugins>
</build>
</profile>
<profile>
<!-- Runs the web console end-to-end tests (Playwright specs of web-console/e2e-tests) on embedded clusters.
Needs the web-console module built with the console (not skipped), and npm ci run in web-console. -->
<id>web-console-tests</id>
<properties>
<!-- Override with -Dmaven.test.redirectTestOutputToFile=false to see the output, such as with -Dweb.console.keepAlive=true -->
<maven.test.redirectTestOutputToFile>true</maven.test.redirectTestOutputToFile>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<groups>web-console</groups>
<includes>
<include>*WebConsoleTest*</include>
</includes>
<systemPropertyVariables>
<web.console.dir>${project.basedir}/../web-console</web.console.dir>
</systemPropertyVariables>
<argLine>
-XX:+UseCompactObjectHeaders
${jdk.strong.encapsulation.argLine}
-Xmx3g
-XX:MaxDirectMemorySize=2500m
-XX:+ExitOnOutOfMemoryError
-XX:+HeapDumpOnOutOfMemoryError
-Duser.language=en
-Dfile.encoding=UTF-8
-Duser.timezone=UTC
-Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager
-Daws.region=us-east-1
</argLine>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* 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.testing.embedded.compact;

import org.apache.druid.testing.embedded.console.WebConsoleTestBase;
import org.junit.jupiter.api.Test;

/**
* Sets up auto-compaction from the Datasources view of the web console, and forces compaction runs from there.
*/
public class AutoCompactionWebConsoleTest extends WebConsoleTestBase
{
@Test
public void testCompactionConfigAndForcedRun() throws Exception
{
runSpec("auto-compaction.spec.ts");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
/*
* 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.testing.embedded.console;

import com.google.common.collect.Sets;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

import java.io.File;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Set;
import java.util.TreeSet;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import java.util.stream.Stream;

/**
* Checks that every Playwright spec of {@code web-console/e2e-tests} is run by a {@link WebConsoleTestBase} test (the
* specs are passed to {@link WebConsoleTestBase#runSpec} by name), and that those tests run only specs that exist.
* It needs no cluster, so it runs with the unit tests rather than in the {@code web-console-tests} profile.
*/
public class WebConsoleSpecsTest
{
private static final Pattern RUN_SPEC = Pattern.compile("runSpec\\(\\s*\"([^\"]+)\"");

@Test
public void testEverySpecIsRun() throws IOException
{
final Set<String> specs;
try (Stream<Path> files = Files.list(new File(WebConsoleTestBase.webConsoleDir(), "e2e-tests").toPath())) {
specs = files.map(file -> file.getFileName().toString())
.filter(name -> name.endsWith(".spec.ts"))
.collect(Collectors.toCollection(TreeSet::new));
}

final Set<String> runSpecs = new TreeSet<>();
try (Stream<Path> files = Files.walk(Path.of("src", "test", "java"))) {
for (Path file : files.filter(f -> f.getFileName().toString().endsWith("WebConsoleTest.java")).toList()) {
final Matcher matcher = RUN_SPEC.matcher(Files.readString(file, StandardCharsets.UTF_8));
while (matcher.find()) {
runSpecs.add(matcher.group(1));
}
}
}

Assertions.assertFalse(specs.isEmpty(), "Found no specs in web-console/e2e-tests");
Assertions.assertEquals(
Set.of(),
Sets.difference(specs, runSpecs),
"Specs of web-console/e2e-tests that no *WebConsoleTest runs (with runSpec)"
);
Assertions.assertEquals(
Set.of(),
Sets.difference(runSpecs, specs),
"Specs that a *WebConsoleTest runs, which are not in web-console/e2e-tests"
);
}
}
Loading
Loading