From surefire-usersshane48@example.com Mon Mar 23 14:02:31 2009
Return-Path: <surefire-usersshane48@example.com>
Delivered-To: shane48@example.com
Received: (qmail 29983 invoked from network); 23 Mar 2009 14:02:31 -0000
Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155)
  by minotaur.apache.org with SMTP; 23 Mar 2009 14:02:31 -0000
Received: (qmail 67122 invoked by uid 500); 23 Mar 2009 14:02:31 -0000
Delivered-To: shane48@example.com
Received: (qmail 67082 invoked by uid 500); 23 Mar 2009 14:02:31 -0000
Mailing-List: contact shane48@example.com; run by ezmlm
Precedence: bulk
List-Help: <mailto:shane48@example.com>
List-Unsubscribe: <mailto:shane48@example.com>
List-Post: <mailto:shane48@example.com>
List-Id: <surefire-users.maven.apache.org>
Reply-To: shane48@example.com
Delivered-To: mailing list shane48@example.com
Received: (qmail 67072 invoked by uid 99); 23 Mar 2009 14:02:31 -0000
Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Mar 2009 14:02:31 +0000
X-ASF-Spam-Status: No, hits=-4.0 required=10.0
	tests=RCVD_IN_DNSWL_MED,SPF_PASS
X-Spam-Check-By: apache.org
Received-SPF: pass (nike.apache.org: local policy)
Received: from [83.161.120.155] (HELO mail.cs.tu-berlin.de) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Mar 2009 14:02:22 +0000
Received: from localhost (localhost [83.161.120.155])
	by localhost-12225.cs.tu-berlin.de (Postfix) with ESMTP id 46E302B32A
	for <shane48@example.com>; Mon, 23 Mar 2009 15:02:02 +0100 (MET)
X-Virus-Scanned: shane48@example.com (including SpamAssassin)
Received: from mailhost.cs.tu-berlin.de ([83.161.120.155])
	by localhost (mail.cs.tu-berlin.de [83.161.120.155]) (amavisd-new, port 12224)
	with ESMTP id iJM89SMIDpdo 13701-20
	for <shane48@example.com>;
	Mon, 23 Mar 2009 15:02:00 +0100 (MET) 17127
Received: from [83.161.120.155] (dslb-088-073-014-207.pools.arcor-ip.net [83.161.120.155])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	(Authenticated sender: choeger)
	by mailhost.cs.tu-berlin.de (Postfix) with ESMTPSA
	for <shane48@example.com>; Mon, 23 Mar 2009 15:02:00 +0100 (MET)
Subject: forking single tests from junit test suite
From: Christoph =?ISO-8859-1?Q?H=F6ger?= <shane48@example.com>
To: shane48@example.com
Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-Z2X4sx7msPl+Ej3X1IO5"
Date: Mon, 23 Mar 2009 15:01:59 +0100
Message-Id: <shane48@example.com>
Mime-Version: 1.0
X-Mailer: Evolution 2.24.5 (2.24.5-1.fc10) 
X-Virus-Checked: Checked by ClamAV on apache.org

--=-Z2X4sx7msPl+Ej3X1IO5
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Hi,

I need to test a feature for my project on large test input files.
To get that, I create TestCases from a single TestSuite dynamically. The
relevant part of the pom looks like:


> 			<plugin>
> 				<groupId>org.apache.maven.plugins</groupId>
> 				<artifactId>maven-surefire-plugin</artifactId>
> 				<configuration>
> 					<reportFormat>plain</reportFormat>
> 					<trimStackTrace>false</trimStackTrace>
> 					<forkMode>perTest</forkMode>
> 					<argLine>-XX:+HeapDumpOnOutOfMemoryError</argLine>
> 					<excludes>
> 						<exclude>**/IncrementalParsePhase1Test.java</exclude>
> 						<exclude>**/incremental/testparser/*.java</exclude>
> 					</excludes>
> 					<includes>
> 						<include>**/IncrementalParsingTestSuite.java</include>
> 					</includes>
> 				</configuration>
> 			</plugin>

In my TestSuite there runs a loop:


> for (int i =3D 0; i < Lexer.getCachedInput().size(); i++) {
> 				//brake for large test cases
> 				if (i % (1 + (Lexer.getCachedInput().size() / 20)) !=3D 0)
> 					continue;
>=20
> 				Range diffRange =3D new Range(i, i);
>=20
> 				IncrementalParsePhase1Test test =3D new IncrementalParsePhase1Test(
> 						Lexer.getInputFileName(), Lexer.getCachedInput(),
> 						generatedStates, diffRange, rootAbsy, Lexer.getCachedInput().get(i)=
.getSavedConfiguration());
> 				suite.addTest(test);
> 			}

The problem is, that maven does not seem to run every testCase in a new
vm, but reuses the old one (and somehow prevents the GC from cleaning
up old testcases), so earlier or later I run into a heap overflow.

This is especially bad, as I want to measure the performance of some operat=
ions and the GC seems to interrupt my threads thus creating huge performanc=
e problems.

So is it possible to make surefire run each test in a single vm?

regards

Christoph

--=-Z2X4sx7msPl+Ej3X1IO5
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Dies ist ein digital signierter Nachrichtenteil

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEABECAAYFAknHllQACgkQhMBO4cVSGS/I0gCeP5svXUvv1c1GfE1egFaIj2x5
uG4AnRT7Ln98/BWcf+Akrsc9/ZeDF19O
=+WeH
-----END PGP SIGNATURE-----

--=-Z2X4sx7msPl+Ej3X1IO5--



{'source': 'Apache Software Foundation Public Mail Archives'}