@@ -171,17 +171,17 @@ var _ = Describe("service command", func() {
171
171
})
172
172
173
173
It ("displays the bound apps" , func () {
174
- //Delay to reduce flakiness
175
- time . Sleep ( 10 * time . Second )
176
- session := helpers . CF ( serviceCommand , serviceInstanceName , "-v" )
177
- Eventually ( session ). Should ( Exit ( 0 ) )
178
-
179
- Expect ( session ). To ( SatisfyAll (
180
- Say (`Showing bound apps: \n` ),
181
- Say ( `name \s+binding name \s+status\s+message \n` ),
182
- Say (`%s\s+%s\s+create succeeded\s*\n` , appName1 , bindingName1 ),
183
- Say ( `%s\s+%s\s+create succeeded\s*\n` , appName2 , bindingName2 ),
184
- ))
174
+ Eventually ( func ( g Gomega ) {
175
+ session := helpers . CF ( serviceCommand , serviceInstanceName , "-v" ). Wait ( )
176
+ g . Expect ( session ). Should ( Exit ( 0 ) )
177
+ output := session . Buffer (). Contents ( )
178
+ g . Expect ( output ). Should ( SatisfyAll (
179
+ Say ( `Showing bound apps:\n` ),
180
+ Say (`name\s+binding name\s+status\s+message \n` ),
181
+ ContainSubstring ( `%s \s+%s \s+create succeeded\s* \n`, appName1 , bindingName1 ),
182
+ ContainSubstring (`%s\s+%s\s+create succeeded\s*\n` , appName2 , bindingName2 ),
183
+ ))
184
+ }). Should ( Succeed ( ))
185
185
})
186
186
})
187
187
0 commit comments