Issue #1679570 by sun: Fixed TestBase does not always use the correct database connection for handling assertions.