Closed onobc closed 1 month ago
The spring.binders for the spring-cloud-stream-test-binder module was removed
- indeed. Yet I am not sure how it could cause your issue, but i will look
@onobc There was a problem with assertion (you can look how wrong it was).
The core of this issue is that once we removes spring.binders
, the TestBinder was no longer picked up by default mechanism. . . which is correct, since before that we simply had two instances of it (one being dormant. . . I can explain later . . . too much to type). But now TestBinder (as intended) is only bootstrapped on-demand (single instance).
Anyway, give it a shot. . . your test now passes.
@olegz that did the trick. Thanks.
Description I have a
@SpringBootTest
that uses the test binder (via the@EnableTestBinder
annotation). The test uses aTestRestTemplate
to invoke theactuator/bindings
endpoint. The test started failing after updating to SCSt4.1.2
.The client side error is surfaced as:
Possible Cause The
spring.binders
for thespring-cloud-stream-test-binder
module was removed (commit here).Even though the
TestChannelBinderConfiguration
is imported via the@EnableTestBinder
, it seems that alone is not enough and there is some other code path that still requires thespring.binders
to be present.To Reproduce See https://github.com/onobc/demo
Version of the framework 4.1.2
Expected behavior The
actuator/bindings
endpoints returns a 200 success code w/ the test binder listed.