runzhiwang opened a new pull request #222: [LIVY-647][TEST]Fix travis failed on 
batch session should not be gc-ed until application is finished
   ## What changes were proposed in this pull request?
   Fix travis failed on "batch session should not be gc-ed until application is 
   The cause of failed is as follows:
   1. When create BatchSessionManager, the GarbageCollector thread will be 
created, which collect garbage according to session.state. However the session 
was mocked, and the test thread execute doReturn(s).when(session).state several 
times, if the test thread do half of the statement 
doReturn(s).when(session).state, and GarbageCollector thread check 
session.state at this time, the exception will threw by GarbageCollector thread.
   2. So the fix avoid executing doReturn(s).when(session).state after session 
has been registered into SessionManager.
   ## How was this patch tested?
   Existed UT and IT.

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

With regards,
Apache Git Services

Reply via email to