Skip to content

Commit 4942760

Browse files
author
CF Garden
committed
Fix flaky test
[finishes #144849063]
1 parent d6c26df commit 4942760

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

integration/create_remote_test.go

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,13 @@ var _ = Describe("Create with remote images", func() {
165165
var statsMap map[string]string
166166
Expect(yaml.Unmarshal(stats, &statsMap)).To(Succeed())
167167

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

173176
time.Sleep(200 * time.Millisecond)
174177
runs++

0 commit comments

Comments
 (0)