-
Notifications
You must be signed in to change notification settings - Fork 190
[BUG] Tests can't start Prometheus #1083
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't workinginfrastructureChanges to infrastructure, testing, CI/CD, pipelines, etc.Changes to infrastructure, testing, CI/CD, pipelines, etc.
Description
What is the bug?
Integration and doc tests often can't start Prometheus
How can one reproduce the bug?
$ ./gradlew ':integ-test:integTest'
=======================================
OpenSearch Build Hamster says Hello!
Gradle Version : 7.4.2
OS Info : Linux 5.15.68.1-microsoft-standard-WSL2 (amd64)
JDK Version : 11 (Ubuntu JDK)
JAVA_HOME : /usr/lib/jvm/java-11-openjdk-amd64
Random Testing Seed : 4C3DB35D2E65CC93
In FIPS 140 mode : false
=======================================
> Task :integ-test:compileJdbc
> Task :compileJava UP-TO-DATE
> Task :processResources UP-TO-DATE
> Task :classes UP-TO-DATE
> Task :shadowJar UP-TO-DATE
Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/4.10.2/userguide/command_line_interface.html#sec:command_line_warnings
BUILD SUCCESSFUL in 1s
3 actionable tasks: 3 up-to-date
> Task :integ-test:startPrometheus
Download https://github.com/prometheus/prometheus/releases/download/v2.37.2/prometheus-2.37.2.linux-amd64.tar.gz
Renaming folder : prometheus-2.37.2.linux-amd64
true
Renaming folder : prometheus-2.39.1.linux-amd64
false
> Task :integ-test:startPrometheus FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':integ-test:startPrometheus'.
> Server already running!
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.4.2/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 12s
13 actionable tasks: 5 executed, 8 up-to-date
$ ps faxwwu | grep [p]rom
$
$ ls .prom.pid.lock
ls: cannot access '.prom.pid.lock': No such file or directory
$
What is the expected behavior?
Prometheus shouldn't be involved in main test processes. Tests flow should try running it only if Prometheus tests started. :integ-test: module should have another task for these tests.
At least, test flow should continue if start failed.
What is your host/environment?
662a938 @ 2.x
Do you have any additional context?
Tests also can't stop it properly if interrupted.
N/A
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinginfrastructureChanges to infrastructure, testing, CI/CD, pipelines, etc.Changes to infrastructure, testing, CI/CD, pipelines, etc.