Skip to content

Commit

Permalink
Fix flaky test
Browse files Browse the repository at this point in the history
[finishes #144849063]
  • Loading branch information
CF Garden committed May 4, 2017
1 parent d6c26df commit 4942760
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions integration/create_remote_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,13 @@ var _ = Describe("Create with remote images", func() {
var statsMap map[string]string
Expect(yaml.Unmarshal(stats, &statsMap)).To(Succeed())

n, err := units.ParseBase2Bytes(strings.Replace(strings.ToUpper(statsMap["VmHWM"]), " ", "", -1))
Expect(err).NotTo(HaveOccurred())
// Biggest ubuntu:trusty layer is 65694192 bytes
Expect(n).To(BeNumerically("<", 50*1024*1024))
virtualMemoryHighWaterMark := strings.Replace(strings.ToUpper(statsMap["VmHWM"]), " ", "", -1)
if virtualMemoryHighWaterMark != "" {
n, err := units.ParseBase2Bytes(virtualMemoryHighWaterMark)
Expect(err).NotTo(HaveOccurred())
// Biggest ubuntu:trusty layer is 65694192 bytes
Expect(n).To(BeNumerically("<", 50*1024*1024))
}

time.Sleep(200 * time.Millisecond)
runs++
Expand Down

0 comments on commit 4942760

Please sign in to comment.