Fix database transaction issue in integration tests