spring-cloud / spring-cloud-stream

Framework for building Event-Driven Microservices
http://cloud.spring.io/spring-cloud-stream
Apache License 2.0
992 stars 605 forks source link

Consider to introduce @StreamTest for SCSt-specific slices to test #1097

Open artembilan opened 6 years ago

artembilan commented 6 years ago

See Spring Boot Reference Manual for more info.

This one might be marked with something like:

public @interface AutoConfigureTestBinder {

    /**
     * If {@link TestSupportBinderAutoConfiguration} should be appied.
         * Defaults to {@code true}
     * @return if test binder support is enabled
     */
    boolean enabled() default true;

}

Right now we can exclude that one only via:

@SpringBootTest(
        properties = "spring.autoconfigure.exclude=org.springframework.cloud.stream.test.binder.TestSupportBinderAutoConfiguration")

which is not so convenient and obvious.

olegz commented 6 years ago

Now with https://github.com/spring-cloud/spring-cloud-stream/commit/e50801c82427fc354f67ad1c3cab3704d9ba9bd7 and new TestBinder being publicly available we can consider doing something like what you are proposing