The metadata test was probably failing due to the redis_pool test not waiting for redis to complete before exiting (or something like that).
Includes tweaks in the db preparation script and in the tests for proper handling of async model. Only a single test is run at the moment, being the only one that succeeded for me.