From reviews-return-1777-archive-asf-public=cust-asf.ponee.io@livy.incubator.apache.org Mon Sep 2 08:58:54 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 7940A180658 for ; Mon, 2 Sep 2019 10:58:54 +0200 (CEST) Received: (qmail 23803 invoked by uid 500); 2 Sep 2019 09:26:42 -0000 Mailing-List: contact reviews-help@livy.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: reviews@livy.incubator.apache.org Delivered-To: mailing list reviews@livy.incubator.apache.org Received: (qmail 23790 invoked by uid 99); 2 Sep 2019 09:26:42 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Sep 2019 09:26:42 +0000 From: GitBox To: reviews@livy.apache.org Subject: [GitHub] [incubator-livy] runzhiwang opened a new pull request #222: [LIVY-647]Fix travis failed on batch session should not be gc-ed until application is finished Message-ID: <156741473381.19299.18352775521760866525.gitbox@gitbox.apache.org> Date: Mon, 02 Sep 2019 08:58:53 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit runzhiwang opened a new pull request #222: [LIVY-647]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 change state by doReturn(s).when(session).state continuely, 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 collecting garbage of mocked session. ## 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