Return-Path: X-Original-To: apmail-maven-issues-archive@minotaur.apache.org Delivered-To: apmail-maven-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8A97A17457 for ; Fri, 7 Nov 2014 20:32:35 +0000 (UTC) Received: (qmail 55069 invoked by uid 500); 7 Nov 2014 20:32:35 -0000 Delivered-To: apmail-maven-issues-archive@maven.apache.org Received: (qmail 55014 invoked by uid 500); 7 Nov 2014 20:32:35 -0000 Mailing-List: contact issues-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@maven.apache.org Delivered-To: mailing list issues@maven.apache.org Received: (qmail 55000 invoked by uid 99); 7 Nov 2014 20:32:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Nov 2014 20:32:35 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [199.193.192.100] (HELO codehaus01.managed.contegix.com) (199.193.192.100) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Nov 2014 20:32:30 +0000 Received: from codehaus01 (localhost.localdomain [127.0.0.1]) by codehaus01.managed.contegix.com (Postfix) with ESMTP id 22C81B1067 for ; Fri, 7 Nov 2014 14:32:10 -0600 (CST) Date: Fri, 7 Nov 2014 14:32:10 -0600 (CST) From: "Tibor Digana (JIRA)" To: issues@maven.apache.org Message-ID: In-Reply-To: References: Subject: [jira] (SUREFIRE-1114) NPE in TestSetStats. Concurrency issue with parallel methods on TestNG. MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 22cf62d5d84cf5bea94eb3b65e0ebd09 X-Virus-Checked: Checked by ClamAV on apache.org [ https://jira.codehaus.org/browse/SUREFIRE-1114?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tibor Digana updated SUREFIRE-1114: ----------------------------------- Description: This issue was fond after running IT tests "CheckTestNgGroupThreadParallelIT" of Maven Surefire Project. The CPU was fully overloaded which was maybe precondition in this issue. The problem is that the TestNG runs test methods in parallel and the TestSetRunListener crashes. The field "reportEntries" in the class "TestSetStats" referenced ArrayList. This collection is not thread-safe which means that the retrieval of the elements is not guaranteed. The elements are added in TestSetStats#finishTest(). The elements are never null, see the TestSetRunListener#testSucceeded() which passed a newly created instance of WrappedReportEntry from wrap(). Caused by: java.lang.NullPointerException at org.apache.maven.plugin.surefire.report.TestSetStats.getTestResults(TestSetStats.java:229) at org.apache.maven.plugin.surefire.report.TestSetRunListener.testSetCompleted(TestSetRunListener.java:130) at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.finishTestSuite(TestNGDirectoryTestSuite.java:306) > NPE in TestSetStats. Concurrency issue with parallel methods on TestNG. > ----------------------------------------------------------------------- > > Key: SUREFIRE-1114 > URL: https://jira.codehaus.org/browse/SUREFIRE-1114 > Project: Maven Surefire > Issue Type: Bug > Components: Maven Surefire Plugin > Affects Versions: 2.18 > Reporter: Tibor Digana > Assignee: Tibor Digana > Attachments: org.apache.maven.surefire.its.CheckTestNgGroupThreadParallelIT.txt > > > This issue was fond after running IT tests "CheckTestNgGroupThreadParallelIT" of Maven Surefire Project. > The CPU was fully overloaded which was maybe precondition in this issue. > The problem is that the TestNG runs test methods in parallel and the TestSetRunListener crashes. > The field "reportEntries" in the class "TestSetStats" referenced ArrayList. This collection is not thread-safe which means that the retrieval of the elements is not guaranteed. > The elements are added in TestSetStats#finishTest(). The elements are never null, see the TestSetRunListener#testSucceeded() which passed a newly created instance of WrappedReportEntry from wrap(). > Caused by: java.lang.NullPointerException > at org.apache.maven.plugin.surefire.report.TestSetStats.getTestResults(TestSetStats.java:229) > at org.apache.maven.plugin.surefire.report.TestSetRunListener.testSetCompleted(TestSetRunListener.java:130) > at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.finishTestSuite(TestNGDirectoryTestSuite.java:306) -- This message was sent by Atlassian JIRA (v6.1.6#6162)