Wrapped the shutdown function in a maybeDeferred, as Twisted's specs say that it'll return a Deferred if it can't complete right now.
Updated the test to return the deferred returned by Riemann.shutdown()