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

Ebean Enhancement not applying to tests #1

Open
peterko2017 opened this issue Jun 22, 2020 · 3 comments
Open

Ebean Enhancement not applying to tests #1

peterko2017 opened this issue Jun 22, 2020 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@peterko2017
Copy link

Environment

VSCode - v1.46.1
Ebean Enhancement 11 - v1.0.1
Java Test Runner - v0.23.0
Ebean - v12.3.4
Jupiter - 5.6.2

Description

I have a Spring Boot 2 project setup with the following directory structure

project
+- src
    +- main
        +- resources
            +- application.properties
            +- ebean.mf
    +- test
        +- resources
            +- application-test.properties
            +- ebean.mf

I'm able to run the project from VSCode without any issues thanks to this new Ebean plugin.
However when I try to run a single JUnit test class or method, I get a failure with the message

io.ebean.config.BeanNotEnhancedException: Bean class package.path.to.my.model.class is not enhanced? Check packages specified in ebean.mf

The test ebean.mf file is the same as the main project's and I don't run into this issue when executing tests in IntelliJ.

Is there something special I need to do to have the Ebean Enhancement Plugin work in a testing context for VSCode?

@Shabirmean
Copy link
Owner

Hello @peterko2017,
Thank you for reporting this issue. The initial release of the plugin was not tested for Ebean enhancement for tests. I will fix this issue in the next release. The expected release date for the next release should before end of August 2020

@Shabirmean Shabirmean added enhancement New feature or request good first issue Good for newcomers labels Jul 28, 2020
@sefsinalas
Copy link

Hi. Im also using it for tests. Was it fixed?

@Tarrowren
Copy link

Hi. Im also using it for tests. Was it fixed?

settings.json

    "java.test.config": {
        "vmArgs": [
            "-javaagent:???/AppData/Roaming/Code/User/globalStorage/shabirmean.ebean-enhancement/ebean-agent-12.1.8.jar"
        ]
    }

and then run the test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants