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

maven run test with moco jsonHttpServer throw java.lang.RuntimeException: java.lang.IllegalArgumentException: unknown configuration :[Z@767df8bd #316

Open
jason-UA opened this issue Apr 14, 2022 · 1 comment

Comments

@jason-UA
Copy link

jason-UA commented Apr 14, 2022

java 1.8, moco 1.3
run test at idea will success, but run maven test will fail!

    void test_update_config() throws Exception {
        ContentResource resource = pathResource("SAFRMockService.json");
        final HttpServer server = jsonHttpServer(8080, resource);
        running(server, () -> {
            final MvcResult result = sendUpdateConfigRequest();
            StatusResponse responses = mapper.readValue(result.getResponse().getContentAsString(), StatusResponse.class);
            assertThat(responses.isStatus()).isEqualTo(true);
            MSConfig databaseConfig = Converter.copy(this.configDao.getSafrConfig()).to(MSConfig.class);
            MSConfig requestConfig = Converter.copy(safrConfigRequest).to(MSConfig.class);
            assertThat(requestConfig).isEqualTo(databaseConfig);
        });
    }
[ERROR] Tests run: 3, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 7.364 s <<< FAILURE! - in com.ms.safr.controller.ConfigIntegrationTest
[ERROR] test_update_config  Time elapsed: 0.213 s  <<< ERROR!
java.lang.RuntimeException: java.lang.IllegalArgumentException: unknown configuration :[Z@767df8bd
        at com.ms.safr.controller.ConfigIntegrationTest.test_update_config(ConfigIntegrationTest.java:60)
Caused by: java.lang.IllegalArgumentException: unknown configuration :[Z@767df8bd
        at com.ms.safr.controller.ConfigIntegrationTest.test_update_config(ConfigIntegrationTest.java:60)
@shiliangui
Copy link

image
在jcoco的插件配置中增加红色区域

Repository owner deleted a comment from ComeonBug Oct 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants