jetty-start / fixing test case for bootlib + jvm args

This commit is contained in:
Joakim Erdfelt 2013-08-26 15:31:06 -07:00
parent 71a94364f3
commit 067fbcba8d
2 changed files with 9 additions and 10 deletions

View File

@ -125,26 +125,25 @@ public class ConfigurationAssert
}
assertContainsUnordered("Downloads",expectedDownloads,actualDownloads);
// Validate BootLib
Set<String> expectedBootlib = new HashSet<>();
// Validate Jvm Args / BootLib Entries
Set<String> expectedJvmArgs = new HashSet<>();
for (String line : textFile)
{
if (line.startsWith("BOOTLIB|"))
if (line.startsWith("BOOTLIB|") || line.startsWith("JVM|"))
{
expectedBootlib.add(getValue(line));
expectedJvmArgs.add(getValue(line));
}
}
Set<String> actualBootlib = new HashSet<>();
Set<String> actualJvmArgs = new HashSet<>();
for (String line : args.getJvmArgs())
{
actualBootlib.add(line);
actualJvmArgs.add(line);
}
assertContainsUnordered("JvmArgs",expectedBootlib,actualBootlib);
if ( expectedBootlib.size() > 0 )
assertContainsUnordered("JvmArgs",expectedJvmArgs,actualJvmArgs);
if ( expectedJvmArgs.size() > 0 )
{
Assert.assertTrue("exec has been turned on", args.isExec());
}
}
private static void assertContainsUnordered(String msg, Set<String> expectedSet, Set<String> actualSet)

View File

@ -31,4 +31,4 @@ LIB|${jetty.home}/lib/servlet-api-3.1.jar
# JVM Args
JVM|-Xms1024m
JVM|-Xms1024m
JVM|-Xmx1024m