Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make CPU percentage test assertion inclusive
We observed in the pipeline this failure: ``` • Failure [1.275 seconds] SigarShared /tmp/build/1944c6a2/gopath/src/github.com/cloudfoundry/gosigar/sigar_shared_test.go:14 ProcCpu /tmp/build/1944c6a2/gopath/src/github.com/cloudfoundry/gosigar/sigar_shared_test.go:15 calculates percentage [It] /tmp/build/1944c6a2/gopath/src/github.com/cloudfoundry/gosigar/sigar_shared_test.go:44 Expected <float64>: 1.1 to be ~ <float64>: 1 /tmp/build/1944c6a2/gopath/src/github.com/cloudfoundry/gosigar/sigar_shared_test.go:51 ``` This test depends on an actual CPU being stressed by infinitely calculating the fibonacci sequence. We suspsect that due to the variability of the containers in the pipeline, occasionally the assertion would be barely out of bounds. Previously, the assertion checked for CPU percentage values from 0.9 - 1.1, exclusive. We changed this to be inclusive. Co-authored-by: Chris Selzo <cselzo@vmware.com> Co-authored-by: Daniel Felipe Ochoa <danielfelipo@vmware.com>
- Loading branch information