ePages-de / restdocs-wiremock

Spring REST Docs WireMock Integration
Apache License 2.0
75 stars 27 forks source link

restdocs-client:test fails #52

Closed ozscheyge closed 7 years ago

ozscheyge commented 7 years ago

I followed the instructions in the README to build the project from source:

./gradlew restdocs-wiremock:build restdocs-wiremock:publishToMavenLocal
./gradlew restdocs-server:build restdocs-server:publishToMavenLocal
./gradlew restdocs-client:build

Then I get:

:restdocs-client:test

com.example.client.NoteServiceTest > should_1_use_dedicated_wiremock_stub FAILED
    org.springframework.web.client.HttpClientErrorException at NoteServiceTest.java:37

com.example.client.NoteServiceTest > should_3_use_default_wiremock_stubs FAILED
    org.springframework.web.client.HttpClientErrorException at NoteServiceTest.java:48
2017-04-26 16:06:37.878  INFO 4664 --- [       Thread-5] o.s.w.c.s.GenericWebApplicationContext   : Closing org.springframework.web.context.support.GenericWebApplicationContext@377c5df4: startup date [Wed Apr 26 16:06:35 CEST 2017]; root of context hierarchy

5 tests completed, 2 failed
:restdocs-client:test FAILED

FAILURE: Build failed with an exception.
ulfsauer0815 commented 7 years ago

I cannot reproduce this. Can you provide more details?

ozscheyge commented 7 years ago
olli@ozep:~/code$ git clone git@github.com:ePages-de/restdocs-wiremock.git
Cloning into 'restdocs-wiremock'...
remote: Counting objects: 1308, done.
remote: Total 1308 (delta 0), reused 0 (delta 0), pack-reused 1308
Receiving objects: 100% (1308/1308), 254.24 KiB | 426.00 KiB/s, done.
Resolving deltas: 100% (519/519), done.
Checking connectivity... done.
olli@ozep:~/code$ cd restdocs-wiremock/
olli@ozep:~/code/restdocs-wiremock$ ./gradlew restdocs-wiremock:build restdocs-wiremock:publishToMavenLocal
Publication sourceJar not found in project :restdocs-wiremock.
Publication sourceJar not found in project :wiremock-spring-boot-starter.
:restdocs-wiremock:compileJava
warning: [options] bootstrap class path not set in conjunction with -source 1.7
1 warning
:restdocs-wiremock:processResources UP-TO-DATE
:restdocs-wiremock:classes
:restdocs-wiremock:jar
:restdocs-wiremock:assemble
:restdocs-wiremock:compileTestJava
warning: [options] bootstrap class path not set in conjunction with -source 1.7
1 warning
:restdocs-wiremock:processTestResources UP-TO-DATE
:restdocs-wiremock:testClasses
:restdocs-wiremock:test
:restdocs-wiremock:check
:restdocs-wiremock:build
:restdocs-wiremock:generatePomFileForMavenJavaPublication
:restdocs-wiremock:sourceJar
:restdocs-wiremock:publishMavenJavaPublicationToMavenLocal
:restdocs-wiremock:publishToMavenLocal

BUILD SUCCESSFUL

Total time: 8.864 secs

This build could be faster, please consider using the Gradle Daemon: https://docs.gradle.org/2.14.1/userguide/gradle_daemon.html
olli@ozep:~/code/restdocs-wiremock$ ./gradlew restdocs-server:build restdocs-server:publishToMavenLocal
Publication sourceJar not found in project :restdocs-wiremock.
Publication sourceJar not found in project :wiremock-spring-boot-starter.
:restdocs-wiremock:generatePomFileForMavenJavaPublication
:restdocs-wiremock:compileJava UP-TO-DATE
:restdocs-wiremock:processResources UP-TO-DATE
:restdocs-wiremock:classes UP-TO-DATE
:restdocs-wiremock:jar UP-TO-DATE
:restdocs-wiremock:sourceJar UP-TO-DATE
:restdocs-wiremock:publishMavenJavaPublicationToMavenLocal
:restdocs-wiremock:publishToMavenLocal
:restdocs-server:compileJava
warning: [options] bootstrap class path not set in conjunction with -source 1.7
1 warning
:restdocs-server:processResources
:restdocs-server:classes
:restdocs-server:findMainClass
:restdocs-server:compileTestJava
warning: [options] bootstrap class path not set in conjunction with -source 1.7
1 warning
:restdocs-server:processTestResources
:restdocs-server:testClasses
:restdocs-server:test
2017-04-26 17:14:58.925  INFO 6699 --- [       Thread-6] o.s.w.c.s.GenericWebApplicationContext   : Closing org.springframework.web.context.support.GenericWebApplicationContext@5a85d76b: startup date [Wed Apr 26 17:14:53 CEST 2017]; root of context hierarchy
2017-04-26 17:14:58.931  INFO 6699 --- [       Thread-6] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
2017-04-26 17:14:58.932  INFO 6699 --- [       Thread-6] org.hibernate.tool.hbm2ddl.SchemaExport  : HHH000227: Running hbm2ddl schema export
2017-04-26 17:14:58.936  INFO 6699 --- [       Thread-6] org.hibernate.tool.hbm2ddl.SchemaExport  : HHH000230: Schema export complete
:restdocs-server:asciidoctor
:restdocs-server:jar
:restdocs-server:bootRepackage
:restdocs-server:assemble
:restdocs-server:check
:restdocs-server:build
:restdocs-server:generatePomFileForWiremockJarPublication
:restdocs-server:wiremockJar
:restdocs-server:publishWiremockJarPublicationToMavenLocal
:restdocs-server:publishToMavenLocal

BUILD SUCCESSFUL

Total time: 18.812 secs

This build could be faster, please consider using the Gradle Daemon: https://docs.gradle.org/2.14.1/userguide/gradle_daemon.html
olli@ozep:~/code/restdocs-wiremock$ ./gradlew restdocs-client:build
Publication sourceJar not found in project :restdocs-wiremock.
Publication sourceJar not found in project :wiremock-spring-boot-starter.
:restdocs-server:generatePomFileForWiremockJarPublication
:restdocs-wiremock:generatePomFileForMavenJavaPublication
:restdocs-wiremock:compileJava UP-TO-DATE
:restdocs-wiremock:processResources UP-TO-DATE
:restdocs-wiremock:classes UP-TO-DATE
:restdocs-wiremock:jar UP-TO-DATE
:restdocs-wiremock:sourceJar UP-TO-DATE
:restdocs-wiremock:publishMavenJavaPublicationToMavenLocal
:restdocs-wiremock:publishToMavenLocal
:restdocs-server:compileJava UP-TO-DATE
:restdocs-server:processResources UP-TO-DATE
:restdocs-server:classes UP-TO-DATE
:restdocs-server:compileTestJava UP-TO-DATE
:restdocs-server:processTestResources UP-TO-DATE
:restdocs-server:testClasses UP-TO-DATE
:restdocs-server:test UP-TO-DATE
:restdocs-server:asciidoctor UP-TO-DATE
:restdocs-server:jar
:restdocs-server:wiremockJar UP-TO-DATE
:restdocs-server:publishWiremockJarPublicationToMavenLocal
:restdocs-server:publishToMavenLocal
:restdocs-client:compileJava
warning: [options] bootstrap class path not set in conjunction with -source 1.7
1 warning
:restdocs-client:processResources
:restdocs-client:classes
:restdocs-client:findMainClass
:restdocs-client:jar
:restdocs-client:bootRepackage
:restdocs-client:assemble
:wiremock-spring-boot-starter:compileJava
warning: [options] bootstrap class path not set in conjunction with -source 1.7
:wiremock-spring-boot-starter:processResources
:wiremock-spring-boot-starter:classes
:wiremock-spring-boot-starter:jar
:restdocs-client:compileTestJava
warning: [options] bootstrap class path not set in conjunction with -source 1.7
1 warning
:restdocs-client:processTestResources
:restdocs-client:testClasses
:restdocs-client:test

com.example.client.NoteServiceTest > should_1_use_dedicated_wiremock_stub FAILED
    org.springframework.web.client.HttpClientErrorException at NoteServiceTest.java:37

com.example.client.NoteServiceTest > should_3_use_default_wiremock_stubs FAILED
    org.springframework.web.client.HttpClientErrorException at NoteServiceTest.java:48
2017-04-26 17:15:22.659  INFO 6773 --- [       Thread-5] o.s.w.c.s.GenericWebApplicationContext   : Closing org.springframework.web.context.support.GenericWebApplicationContext@377c5df4: startup date [Wed Apr 26 17:15:20 CEST 2017]; root of context hierarchy

5 tests completed, 2 failed
:restdocs-client:test FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':restdocs-client:test'.
> There were failing tests. See the report at: file:///home/olli/code/restdocs-wiremock/client/build/reports/tests/index.html

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 13.723 secs
olli@ozep:~/code/restdocs-wiremock$ java -version
openjdk version "1.8.0_121"
OpenJDK Runtime Environment (build 1.8.0_121-8u121-b13-0ubuntu1.16.04.2-b13)
OpenJDK 64-Bit Server VM (build 25.121-b13, mixed mode)

Which environment info do you need?