helidon-io / helidon

Java libraries for writing microservices
https://helidon.io
Apache License 2.0
3.51k stars 566 forks source link

After using the database to build the application, the test times error #8954

Closed essapp closed 3 months ago

essapp commented 3 months ago

Environment Details


Problem Description

image

Steps to reproduce

image

Because of field name capitalization issues.

tvallin commented 3 months ago

The issue cannot be reproduced:

Please provide more information to reproduce your error.

essapp commented 3 months ago

The issue cannot be reproduced:

  • I generated a project using the maven command you provided
  • mvn install to build the project
  • The tests are passing

Please provide more information to reproduce your error. mvn test or mvn install or mvn package the DbClumn names is uppercase,but when debugging in a java IDE the DbClumn names is lowercase. Reproducing the environment: https://github.com/essapp/server

tvallin commented 3 months ago

I see, so I recommend you to use helidon CLI or our starter project (https://helidon.io/starter/4.0.10?step=4&app-type=database) to generate your sample app. So you can select oracle DB and avoid these issues. You can take a look at our example as well : https://github.com/helidon-io/helidon/tree/main/examples/dbclient

essapp commented 3 months ago

I see, so I recommend you to use helidon CLI or our starter project (https://helidon.io/starter/4.0.10?step=4&app-type=database) to generate your sample app. So you can select oracle DB and avoid these issues. You can take a look at our example as well : https://github.com/helidon-io/helidon/tree/main/examples/dbclient

I just saw the solution in :https://github.com/helidon-io/helidon/blob/main/examples/dbclient/jdbc/src/test/java/io/helidon/examples/dbclient/jdbc/AbstractPokemonServiceTest.java

private String getName(JsonObject json) {
        return json.containsKey("name")
                ? json.getString("name")
                : json.getString("NAME");
}