File tree Expand file tree Collapse file tree 1 file changed +5
-11
lines changed
Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -84,17 +84,9 @@ abstract class AbstractMainTest : AbstractTest() {
8484 fun printHelp (client : String ) {
8585 val parameters =
8686 " $client --help" .split(" " ).toTypedArray()
87- val previousManager = System .getSecurityManager()
88- try {
89- val manager = NoExitSecurityManager (previousManager)
90- System .setSecurityManager(manager)
87+ assertSystemExit(0 , Executable {
9188 main(parameters)
92- fail(" expected exception" )
93- } catch (e: SystemExitingWithStatus ) {
94- assertThat(e.status).isEqualTo(0 )
95- } finally {
96- System .setSecurityManager(previousManager)
97- }
89+ })
9890 }
9991
10092 @Tag(" external" )
@@ -136,7 +128,9 @@ abstract class AbstractMainTest : AbstractTest() {
136128 " connector --broker $brokerUrl --address $address --count 1" .split(" " ).toTypedArray()
137129 assertTimeoutPreemptively(Duration .ofSeconds(10 )) {
138130 print (" Connecting: " )
139- main(connectorParameters)
131+ assertNoSystemExit {
132+ main(connectorParameters)
133+ }
140134 }
141135 }
142136
You can’t perform that action at this time.
0 commit comments