From be4be6b3cafc31820e0042752c500fd91b9d003e Mon Sep 17 00:00:00 2001 From: kutzi Date: Mon, 23 Aug 2010 21:32:32 +0000 Subject: [PATCH] added test that duration of the module builds is not longer than the duration of the moduleset build git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@34058 71c3de6d-444a-0410-be80-ed276b4c234a --- test/src/test/java/hudson/maven/MavenMultiModuleTest.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/src/test/java/hudson/maven/MavenMultiModuleTest.java b/test/src/test/java/hudson/maven/MavenMultiModuleTest.java index 754c9d41d3..e7f972d6de 100644 --- a/test/src/test/java/hudson/maven/MavenMultiModuleTest.java +++ b/test/src/test/java/hudson/maven/MavenMultiModuleTest.java @@ -63,6 +63,13 @@ public class MavenMultiModuleTest extends HudsonTestCase { assertEquals("moduleC should have Result.SUCCESS", Result.SUCCESS, modBuild.getResult()); } } + + long summedModuleDuration = 0; + for (MavenBuild modBuild : pBuild.getModuleLastBuilds().values()) { + summedModuleDuration += modBuild.getDuration(); + } + assertTrue("duration of moduleset build should be greater-equal than sum of the module builds", + pBuild.getDuration() >= summedModuleDuration); } /** -- GitLab