Fixed the test

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | YES, although some travis builds still fail due to a timing issue
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Test was broken by #8043.