You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.eclipse.sisu.wire.ParametersTest
[ERROR] Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.659 s <<< FAILURE! - in org.eclipse.sisu.wire.ParametersTest
[ERROR] org.eclipse.sisu.wire.ParametersTest.testCustomParameters Time elapsed: 0.143 s <<< ERROR!
com.google.inject.CreationException:
Unable to create injector, see the following errors:
1) An exception was caught and reported. Message: This Provider cannot be used until the Injector has been created.
at [unknown source]
2) [Guice/MissingImplementation]: No implementation for String[] annotated with @Parameters() was bound.
Requested by:
1 : ParametersTest.arguments(ParametersTest.java:26)
\_ for field arguments
at ParametersTest$2.configure(ParametersTest.java:60)
\_ installed by: WireModule -> ParametersTest$2
Learn more:
https://github.com/google/guice/wiki/MISSING_IMPLEMENTATION
3) [Guice/MissingImplementation]: No implementation for Map<String, String> annotated with @Parameters() was bound.
Requested by:
1 : ParametersTest.properties(ParametersTest.java:26)
\_ for field properties
at ParametersTest$2.configure(ParametersTest.java:60)
\_ installed by: WireModule -> ParametersTest$2
Learn more:
https://github.com/google/guice/wiki/MISSING_IMPLEMENTATION
3 errors
======================
Full classname legend:
======================
Parameters: "org.eclipse.sisu.Parameters"
ParametersTest: "org.eclipse.sisu.wire.ParametersTest"
ParametersTest$2: "org.eclipse.sisu.wire.ParametersTest$2"
WireModule: "org.eclipse.sisu.wire.WireModule"
========================
End of classname legend:
========================
at org.eclipse.sisu.wire.ParametersTest.testCustomParameters(ParametersTest.java:55)
Caused by: java.lang.IllegalStateException: This Provider cannot be used until the Injector has been created.
at org.eclipse.sisu.wire.ParametersTest.testCustomParameters(ParametersTest.java:55)
The text was updated successfully, but these errors were encountered:
mcculls
changed the title
ParametersTest.testCustomParameters fails with -Dtest-guice-version=5.0.1
ParametersTest.testCustomParameters fails when using -Dtest-guice-version=5.0.1
Oct 29, 2021
mcculls
changed the title
ParametersTest.testCustomParameters fails when using -Dtest-guice-version=5.0.1
ParametersTest.testCustomParameters fails for test-guice-version=5.0.1
Oct 29, 2021
The underlying issue is in ElementAnalyzer.mergeParameters where it attempts to merge different sources of parameters into a single map or sequence. It assumes that @Provides bindings can be called immediately, which is true for the test when using Guice 4.1.0 or earlier but isn't true for Guice 4.2.0 or later.
The solution will be to do the merge lazily, caching the result to avoid having to merge it on every request.
The text was updated successfully, but these errors were encountered: