[1.7.x] Made main user disconnect after creating test user/tablespaces on Oracle

Backport of 4c85a0d95f from master