added some delays after session.close() to a test that was intermittently failing.