Fix handling db connections

+ exclude test project from package