Describe the bug
Implementing QuarkusTestBeforeAllCallback like follows
public class CustomBeforeAllCallback implements QuarkusTestBeforeAllCallback{
@Override
public void beforeAll(Object testInstance) {
System.out.println("before all message");
}
}
Test methods like follows
@Test
public void testHelloEndpoint() {
System.out.println("first");
}
@Test
public void anotherTest() {
System.out.println("second");
}
gives me
before all message
second
before all message
first
Expected behavior
The callback is run before all @Test methods only once. So in case of example it would look like
before all message
second
first
Actual behavior
The callback is run before every @Test method.
To Reproduce
Link to a small reproducer (preferably a Maven project if the issue is not Gradle-specific).
# Add your application.properties here, if applicable.
Screenshots
(If applicable, add screenshots to help explain your problem.)
Environment (please complete the following information):
Output of uname -a or ver:
Darwin MacBook-Pro 19.4.0 Darwin Kernel Version 19.4.0: Wed Mar 4 22:28:40 PST 2020; root:xnu-6153.101.6~15/RELEASE_X86_64 x86_64
- Output of `java -version`:
openjdk version "11.0.7" 2020-04-14
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.7+10)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.7+10, mixed mode)
- GraalVM version (if different from Java):
- Quarkus version or git rev:
1.8.1.Final
```
- Build tool (ie. output of `mvnw --version` or `gradlew --version`):
```
Apache Maven 3.6.2 (40f52333136460af0dc0d7232c0dc0bcf0d9e117; 2019-08-27T17:06:16+02:00)
```
**Additional context**
(Add any other context about the problem here.)
---
https://github.com/quarkusio/quarkus/issues/12250
---
$upstream:12250$
Describe the bug Implementing QuarkusTestBeforeAllCallback like follows
Test methods like follows
gives me
Expected behavior The callback is run before all @Test methods only once. So in case of example it would look like
Actual behavior The callback is run before every @Test method.
To Reproduce
Link to a small reproducer (preferably a Maven project if the issue is not Gradle-specific).
Or attach an archive containing the reproducer to the issue. code-with-quarkus 2.zip
Steps to reproduce the behavior:
Configuration
Screenshots (If applicable, add screenshots to help explain your problem.)
Environment (please complete the following information):
uname -a
orver
:openjdk version "11.0.7" 2020-04-14 OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.7+10) OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.7+10, mixed mode)