tests: Fix the sopradic test failure in TestListObjectPartsDiskNotFound (#4107)

getBucketInfo() should keep track errors ignored,
such that in a situation where all errors were
ignored we need to reduce the errors using readQuorum
to get a consistent error value.

This is the problem we see with DiskNotFound test
disks are randomly removed.

Fixes #4095
This commit is contained in:
Harshavardhana
2017-04-12 15:38:35 -07:00
committed by GitHub
parent e4bd882f11
commit 6683247080
2 changed files with 15 additions and 7 deletions

View File

@@ -1457,7 +1457,7 @@ func testListObjectPartsDiskNotFound(obj ObjectLayer, instanceType string, disks
// Failed as expected, but does it fail for the expected reason.
if actualErr != nil && !testCase.shouldPass {
if !strings.Contains(actualErr.Error(), testCase.expectedErr.Error()) {
t.Errorf("Test %d: %s: Expected to fail with error \"%s\", but instead failed with error \"%s\" instead", i+1, instanceType, testCase.expectedErr.Error(), actualErr.Error())
t.Errorf("Test %d: %s: Expected to fail with error \"%s\", but instead failed with error \"%s\" instead", i+1, instanceType, testCase.expectedErr, actualErr)
}
}
// Passes as expected, but asserting the results.