The Session from a tensorflow.python.training.Supervisor should be obtained from managed_session, rather than prepare_or_wait_for_session. The managed session will ensure that the service threads are started when the session is created and that the threads are closed down properly, the session is destroyed and all resources are released.
When the prepare_or_wait_for_session method is used to create a session, the user is responsible for all of this. These tests did not contain any shutdown code previously and so the session was not being destroyed properly.
These tests should not be testing the handling of an incomplete shutdown, if that should be tested then it is probably better to have this in the supervisor_test test cases.
The Session from a tensorflow.python.training.Supervisor should be obtained from managed_session, rather than prepare_or_wait_for_session. The managed session will ensure that the service threads are started when the session is created and that the threads are closed down properly, the session is destroyed and all resources are released.
When the prepare_or_wait_for_session method is used to create a session, the user is responsible for all of this. These tests did not contain any shutdown code previously and so the session was not being destroyed properly.
These tests should not be testing the handling of an incomplete shutdown, if that should be tested then it is probably better to have this in the supervisor_test test cases.