Attemp to fix spark tests

Did some tweaks and added some logging to help resolving the db issues.