Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quarkus-junit5: @TestHttpEndpoint is null #43965

Closed
nicolasduminil opened this issue Oct 18, 2024 · 1 comment
Closed

quarkus-junit5: @TestHttpEndpoint is null #43965

nicolasduminil opened this issue Oct 18, 2024 · 1 comment
Labels
kind/bug Something isn't working

Comments

@nicolasduminil
Copy link

Describe the bug

Have tried the example shown here with Quarkus 3.15.

Expected behavior

I expect that the following test passes:

  ...
  @TestHTTPEndpoint(SayHello.class)
  URL url;

  @Test
  public void testUrl()
  {
    assertThat(url).isNotNull();
  }
  ...

Actual behavior

The test above doesn't pass as url is null.

How to Reproduce?

Run this example. Otherwise I can provide a reproducer, if required.

Output of uname -a or ver

Linux nicolas-XPS-15-9570 6.8.0-47-generic #47-Ubuntu SMP PREEMPT_DYNAMIC Fri Sep 27 21:40:26 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

Output of java -version

java version "21.0.3" 2024-04-16 LTS Java(TM) SE Runtime Environment (build 21.0.3+7-LTS-152) Java HotSpot(TM) 64-Bit Server VM (build 21.0.3+7-LTS-152, mixed mode, sharing)

Quarkus version or git rev

3.15

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.9.5 (57804ffe001d7215b5e7bcb531cf83df38f93546) Maven home: /opt/apache-maven-3.9.5 Java version: 21.0.3, vendor: Oracle Corporation, runtime: /usr/lib/jvm/jdk-21-oracle-x64 Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "6.8.0-47-generic", arch: "amd64", family: "unix"

Additional information

N/A

@nicolasduminil nicolasduminil added the kind/bug Something isn't working label Oct 18, 2024
@nicolasduminil nicolasduminil changed the title quarkus-junit5: @HttpEndpoint is null quarkus-junit5: @TestHttpEndpoint is null Oct 18, 2024
@nicolasduminil
Copy link
Author

I'm sorry, I didn't pay attention that @TestHttpResource is required as well:

@TestHTTPEndpoint(SayHello.class)
@TestHTTPResource
URL url;

Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant