You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@livy.apache.org by GitBox <gi...@apache.org> on 2019/09/06 07:32:22 UTC

[GitHub] [incubator-livy] 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

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
URL: https://github.com/apache/incubator-livy/pull/222
 
 
   ## What changes were proposed in this pull request?
   
   Fix travis failed on "batch session should not be gc-ed until application is finished"
   
   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:
users@infra.apache.org


With regards,
Apache Git Services