Skip to content

Commit

Permalink
Make the AppReport more resilient
Browse files Browse the repository at this point in the history
- Only run the AppReport on failure
- Set logs.Tail timeout from 30 to 60 seconds

[#172538089]](https://www.pivotaltracker.com/story/show/172538089)

Signed-off-by: Eric Promislow <[email protected]>
  • Loading branch information
davewalter authored and ericpromislow committed Apr 28, 2020
1 parent 670a9c3 commit 3c25c63
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions helpers/app_helpers/app_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ func GetAppGuid(appName string) string {
}

func AppReport(appName string) {
if appName == "" {
if appName == "" || !ginkgo.CurrentGinkgoTestDescription().Failed {
return
}

printStartAppReport(appName)

Eventually(cf.Cf("app", appName, "--guid")).Should(Exit())
Eventually(logs.Tail(Config.GetUseLogCache(), appName)).Should(Exit())
Eventually(cf.Cf("app", appName, "--guid"), time.Second*60).Should(Exit())
Eventually(logs.Tail(Config.GetUseLogCache(), appName), time.Second*60).Should(Exit())

printEndAppReport(appName)
}
Expand Down

0 comments on commit 3c25c63

Please sign in to comment.