spring-projects / spring-shell

Spring based shell
http://projects.spring.io/spring-shell/
Apache License 2.0
733 stars 396 forks source link

Spring Shell Test During Maven Test Block Application #926

Closed denberr95 closed 7 months ago

denberr95 commented 11 months ago

HOW TO USE

WHAT I'M DOING

I'm trying to implement unit tests using:

Depending on how I configured the shell contexts I get different behaviors

It appears that you need to disable shell contexts to allow the @SpringBootShell annotation to complete.

jvalkeal commented 11 months ago

This is indeed a known issue as on default that interactive session hijacks test and never completes. One change we've been thinking is if we'd just leave noninteractive mode enabled and require user to enable others.

denberr95 commented 11 months ago

It could be a good idea. So based on the test scenario the user enables the type of shell session he needs. I just have a doubt, if the CLI provided commands in both modes (interactive/non-interactive) would there be any effect?

jvalkeal commented 11 months ago

There should be no difference as that info is used at runtime.

denberr95 commented 11 months ago

Ok great, in what milestone would it be possible to try it?

jvalkeal commented 7 months ago

Closing this as #1017 changed behaviour discussed above. It's in 3.3.x snapshots and you can follow milestone scheduling.