continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r1159065 - in /continuum/trunk: continuum-api/src/main/java/org/apache/continuum/builder/distributed/manager/ continuum-buildagent/continuum-buildagent-api/src/main/java/org/apache/continuum/buildagent/ continuum-buildagent/continuum-builda...
Date Thu, 18 Aug 2011 07:08:58 GMT
Author: ctan
Date: Thu Aug 18 07:08:57 2011
New Revision: 1159065

URL: http://svn.apache.org/viewvc?rev=1159065&view=rev
Log:
[CONTINUUM-2650] pass the build definition when getting the build agent url and when checking if project is in queue or being processed by the build agent

Modified:
    continuum/trunk/continuum-api/src/main/java/org/apache/continuum/builder/distributed/manager/DistributedBuildManager.java
    continuum/trunk/continuum-buildagent/continuum-buildagent-api/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentService.java
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentServiceImpl.java
    continuum/trunk/continuum-core/src/main/java/org/apache/continuum/builder/distributed/manager/DefaultDistributedBuildManager.java
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
    continuum/trunk/continuum-core/src/test/java/org/apache/continuum/builder/distributed/stubs/SlaveBuildAgentTransportClientStub.java
    continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-api/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportService.java
    continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-client/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportClient.java
    continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-server/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportServer.java
    continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-api/src/main/java/org/apache/maven/continuum/xmlrpc/ContinuumService.java
    continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/client/ContinuumXmlRpcClient.java
    continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/client/SampleClient.java
    continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumServiceImpl.java
    continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/test/java/org/apache/continuum/xmlrpc/server/ContinuumServiceImplTest.java

Modified: continuum/trunk/continuum-api/src/main/java/org/apache/continuum/builder/distributed/manager/DistributedBuildManager.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-api/src/main/java/org/apache/continuum/builder/distributed/manager/DistributedBuildManager.java?rev=1159065&r1=1159064&r2=1159065&view=diff
==============================================================================
--- continuum/trunk/continuum-api/src/main/java/org/apache/continuum/builder/distributed/manager/DistributedBuildManager.java (original)
+++ continuum/trunk/continuum-api/src/main/java/org/apache/continuum/builder/distributed/manager/DistributedBuildManager.java Thu Aug 18 07:08:57 2011
@@ -111,6 +111,6 @@ public interface DistributedBuildManager
     boolean isProjectCurrentlyBuilding( int projectId, int buildDefinitionId )
         throws ContinuumException;
         
-    String getBuildAgentUrl( int projectId )
+    String getBuildAgentUrl( int projectId, int buildDefinitionId )
         throws ContinuumException;
 }

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-api/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentService.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-api/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentService.java?rev=1159065&r1=1159064&r2=1159065&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-api/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentService.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-api/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentService.java Thu Aug 18 07:08:57 2011
@@ -104,17 +104,17 @@ public interface ContinuumBuildAgentServ
 
     boolean isProjectScmRootInQueue( int projectScmRootId, List<Integer> projectIds );
 
-    boolean isProjectCurrentlyBuilding( int projectId );
+    boolean isProjectCurrentlyBuilding( int projectId, int buildDefinitionId );
 
-    boolean isProjectInBuildQueue( int projectId );
+    boolean isProjectInBuildQueue( int projectId, int buildDefinitionId );
 
     boolean isProjectGroupInPrepareBuildQueue( int projectGroupId );
 
     boolean isProjectGroupCurrentlyPreparingBuild( int projectGroupId );
 
-    boolean isProjectInPrepareBuildQueue( int projectId );
+    boolean isProjectInPrepareBuildQueue( int projectId, int buildDefinitionId );
 
-    boolean isProjectCurrentlyPreparingBuild( int projectId );
+    boolean isProjectCurrentlyPreparingBuild( int projectId, int buildDefinitionId );
 
     boolean removeFromPrepareBuildQueue( int projectGroupId, int scmRootId )
         throws ContinuumBuildAgentException;

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentServiceImpl.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentServiceImpl.java?rev=1159065&r1=1159064&r2=1159065&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentServiceImpl.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentServiceImpl.java Thu Aug 18 07:08:57 2011
@@ -796,19 +796,21 @@ public class ContinuumBuildAgentServiceI
         return false;
     }
 
-    public boolean isProjectInPrepareBuildQueue( int projectId )
+    public boolean isProjectInPrepareBuildQueue( int projectId, int buildDefinitionId )
     {
         try
         {
-            log.debug( "Checking if project {} is in prepare build queue", projectId );
+            log.debug( "Checking if projectId={}, buildDefinitionId={} is in prepare build queue", projectId, buildDefinitionId );
             for ( PrepareBuildProjectsTask task : buildAgentTaskQueueManager.getProjectsInPrepareBuildQueue() )
             {
                 if ( task != null )
                 {
                     for ( BuildContext context : task.getBuildContexts() )
                     {
-                        if ( context.getProjectId() == projectId )
+                        if ( context.getProjectId() == projectId && 
+                             ( buildDefinitionId == -1 || context.getBuildDefinitionId() == buildDefinitionId ) )
                         {
+                            log.debug( "projectId={}, buildDefinitionId={} is in prepare build queue" );
                             return true;
                         }
                     }
@@ -817,7 +819,8 @@ public class ContinuumBuildAgentServiceI
         }
         catch ( TaskQueueManagerException e )
         {
-            log.error( "Error while checking if project " + projectId + " is in prepare build queue in agent", e);
+            log.error( "Error while checking if projectId=" + projectId + ", buildDefinitionId=" + buildDefinitionId + 
+                       " is in prepare build queue in agent", e);
         }
 
         return false;
@@ -843,19 +846,21 @@ public class ContinuumBuildAgentServiceI
         return false;
     }
 
-    public boolean isProjectCurrentlyPreparingBuild( int projectId )
+    public boolean isProjectCurrentlyPreparingBuild( int projectId, int buildDefinitionId )
     {
         try
         {
-            log.debug( "Checking if project {} currently preparing build", projectId );
+            log.debug( "Checking if projectId={}, buildDefinitionId={} currently preparing build", projectId, buildDefinitionId );
             PrepareBuildProjectsTask currentPrepareBuildTask = buildAgentTaskQueueManager.getCurrentProjectInPrepareBuild();
 
             if ( currentPrepareBuildTask != null )
             {
                 for ( BuildContext context : currentPrepareBuildTask.getBuildContexts() )
                 {
-                    if ( context.getProjectId() == projectId )
+                    if ( context.getProjectId() == projectId && 
+                         ( buildDefinitionId == -1 || context.getBuildDefinitionId() == buildDefinitionId ) )
                     {
+                        log.debug( "projectId={}, buildDefinitionId={} is currently preparing build" );
                         return true;
                     }
                 }
@@ -863,45 +868,51 @@ public class ContinuumBuildAgentServiceI
         }
         catch ( TaskQueueManagerException e )
         {
-            log.error( "Error while checking if project " + projectId + " is currently preparing build in agent", e);
+            log.error( "Error while checking if projectId=" + projectId + ", buildDefinitionId=" + buildDefinitionId + 
+                       " is currently preparing build in agent", e);
         }
 
         return false;
     }
 
-    public boolean isProjectCurrentlyBuilding( int projectId )
+    public boolean isProjectCurrentlyBuilding( int projectId, int buildDefinitionId )
     {
         try
         {
-            log.debug( "Checking if project {} is currently building", projectId );
+            log.debug( "Checking if projectId={}, buildDefinitionId={} is currently building", projectId, buildDefinitionId );
             BuildProjectTask currentBuildTask = buildAgentTaskQueueManager.getCurrentProjectInBuilding();
 
-            if ( currentBuildTask != null && currentBuildTask.getProjectId() == projectId )
+            if ( currentBuildTask != null && currentBuildTask.getProjectId() == projectId && 
+                 ( buildDefinitionId == -1 || currentBuildTask.getBuildDefinitionId() == buildDefinitionId ) )
             {
+                log.debug( "projectId={}, buildDefinitionId={} is currently building" );
                 return true;
             }
         }
         catch ( TaskQueueManagerException e )
         {
-            log.error( "Error occurred while checking if project " + projectId + " is currently building in agent", e );
+            log.error( "Error occurred while checking if projectId=" + projectId + ", buildDefinitionId=" + buildDefinitionId + 
+                       " is currently building in agent", e );
         }
 
         return false;
     }
 
-    public boolean isProjectInBuildQueue( int projectId )
+    public boolean isProjectInBuildQueue( int projectId, int buildDefinitionId )
     {
         try
         {
-            log.debug( "Checking if project {} is in build queue", projectId );
+            log.debug( "Checking if projectId={}, buildDefinitionId={} is in build queue", projectId, buildDefinitionId );
             List<BuildProjectTask> buildTasks = buildAgentTaskQueueManager.getProjectsInBuildQueue();
 
             if ( buildTasks != null )
             {
                 for ( BuildProjectTask task : buildTasks )
                 {
-                    if ( task.getProjectId() == projectId )
+                    if ( task.getProjectId() == projectId && 
+                         ( buildDefinitionId == -1 || task.getBuildDefinitionId() == buildDefinitionId ) )
                     {
+                        log.debug( "projectId={}, buildDefinitionId={} is in build queue" );
                         return true;
                     }
                 }
@@ -909,7 +920,8 @@ public class ContinuumBuildAgentServiceI
         }
         catch ( TaskQueueManagerException e )
         {
-            log.error( "Error occurred while checking if project " + projectId + " is in build queue of agent", e );
+            log.error( "Error occurred while checking if projectId=" + projectId + ", buildDefinitionId=" + buildDefinitionId + 
+                       " is in build queue of agent", e );
         }
 
         return false;

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/continuum/builder/distributed/manager/DefaultDistributedBuildManager.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/continuum/builder/distributed/manager/DefaultDistributedBuildManager.java?rev=1159065&r1=1159064&r2=1159065&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/continuum/builder/distributed/manager/DefaultDistributedBuildManager.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/continuum/builder/distributed/manager/DefaultDistributedBuildManager.java Thu Aug 18 07:08:57 2011
@@ -1294,8 +1294,11 @@ public class DefaultDistributedBuildMana
                         if ( isAgentAvailable( buildAgentUrl ) )
                         {
                             SlaveBuildAgentTransportService client = createSlaveBuildAgentTransportClientConnection( buildAgentUrl );
-                            
-                            if ( client.isProjectCurrentlyBuilding( projectId ) )
+
+                            // TODO: should check for specific build definition and handle that in UI;
+                            // project with different build definitions can build at the same time in different agents and
+                            // currently, we can't handle that in the ui.
+                            if ( client.isProjectCurrentlyBuilding( projectId, -1 ) )
                             {
                                 agentUrl = buildAgentUrl;
                                 break;
@@ -1326,7 +1329,7 @@ public class DefaultDistributedBuildMana
         return agentUrl;
     }
 
-    public String getBuildAgentUrl( int projectId )
+    public String getBuildAgentUrl( int projectId, int buildDefinitionId )
         throws ContinuumException
     {
         String agentUrl = null;
@@ -1344,15 +1347,18 @@ public class DefaultDistributedBuildMana
                     {
                         if ( isAgentAvailable( buildAgentUrl ) )
                         {
-                            log.debug( "Checking if project {} is currently queued or processed in agent {}", projectId, buildAgentUrl );
+                            log.debug( "Checking if project {} with build definition {} is currently queued or processed in agent {}", 
+                                       new Object[] { projectId, buildDefinitionId, buildAgentUrl } );
 
                             SlaveBuildAgentTransportService client = createSlaveBuildAgentTransportClientConnection( buildAgentUrl );
                             
-                            if ( client.isProjectCurrentlyPreparingBuild( projectId ) ||
-                                client.isProjectCurrentlyBuilding( projectId ) ||
-                                client.isProjectInPrepareBuildQueue( projectId ) ||
-                                client.isProjectInBuildQueue( projectId ) )
+                            if ( client.isProjectInPrepareBuildQueue( projectId, buildDefinitionId ) ||
+                                 client.isProjectCurrentlyPreparingBuild( projectId, buildDefinitionId ) ||
+                                 client.isProjectInBuildQueue( projectId, buildDefinitionId ) ||
+                                 client.isProjectCurrentlyBuilding( projectId, buildDefinitionId ) )
                             {
+                                log.debug( "Project {} with build definition {} is currently queued or processed in agent {}", 
+                                           new Object[] { projectId, buildDefinitionId, buildAgentUrl } );
                                 agentUrl = buildAgentUrl;
                                 break;
                             }

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java?rev=1159065&r1=1159064&r2=1159065&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java Thu Aug 18 07:08:57 2011
@@ -943,7 +943,7 @@ public class DefaultContinuum
             {
                 for ( Integer buildDefId : buildDefIds )
                 {
-                    if ( buildDefId != null && isProjectOkToBuild( project.getId(), buildDefId ) )
+                    if ( isProjectOkToBuild( project.getId(), buildDefId ) )
                     {
                         ProjectScmRoot scmRoot = getProjectScmRootByProject( project.getId() );
 
@@ -963,6 +963,10 @@ public class DefaultContinuum
                             sortedScmRoot.add( scmRoot );
                         }
                     }
+                    else
+                    {
+                        log.info( "Not queueing the build with projectId={} and buildDefinitionId={} because it is already building", projectId, buildDefId );
+                    }
                 }
             }
         }
@@ -1020,6 +1024,7 @@ public class DefaultContinuum
 
         if ( !isProjectOkToBuild( projectId, buildDef.getId() ) )
         {
+            log.info( "Not queueing the build with projectId={} and buildDefinitionId={} because it is already building", projectId, buildDef.getId() );
             return;
         }
 
@@ -1045,6 +1050,7 @@ public class DefaultContinuum
 
         if ( !isProjectOkToBuild( projectId, buildDefinitionId ) )
         {
+            log.info( "Not queueing the build with projectId={} and buildDefinitionId={} because it is already building", projectId, buildDefinitionId );
             return;
         }
 
@@ -3603,6 +3609,7 @@ public class DefaultContinuum
             // check if project already in queue
             if ( !isProjectOkToBuild( projectId, buildDefId ) )
             {
+                log.info( "Not queueing the build with projectId={} and buildDefinitionId={} because it is already building", projectId, buildDefId );
                 continue;
             }
 

Modified: continuum/trunk/continuum-core/src/test/java/org/apache/continuum/builder/distributed/stubs/SlaveBuildAgentTransportClientStub.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/test/java/org/apache/continuum/builder/distributed/stubs/SlaveBuildAgentTransportClientStub.java?rev=1159065&r1=1159064&r2=1159065&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/test/java/org/apache/continuum/builder/distributed/stubs/SlaveBuildAgentTransportClientStub.java (original)
+++ continuum/trunk/continuum-core/src/test/java/org/apache/continuum/builder/distributed/stubs/SlaveBuildAgentTransportClientStub.java Thu Aug 18 07:08:57 2011
@@ -133,7 +133,7 @@ public class SlaveBuildAgentTransportCli
         return null;
     }
 
-    public Boolean isProjectCurrentlyBuilding( int projectId )
+    public Boolean isProjectCurrentlyBuilding( int projectId, int buildDefinitionId )
         throws Exception
     {
         // TODO Auto-generated method stub
@@ -152,7 +152,7 @@ public class SlaveBuildAgentTransportCli
         return true;
     }
 
-    public Boolean isProjectInBuildQueue( int projectId )
+    public Boolean isProjectInBuildQueue( int projectId, int buildDefinitionId )
         throws Exception
     {
         // TODO Auto-generated method stub
@@ -280,14 +280,14 @@ public class SlaveBuildAgentTransportCli
         return null;
     }
 
-    public Boolean isProjectCurrentlyPreparingBuild( int projectId )
+    public Boolean isProjectCurrentlyPreparingBuild( int projectId, int buildDefinitionId )
         throws Exception
     {
         // TODO Auto-generated method stub
         return null;
     }
 
-    public Boolean isProjectInPrepareBuildQueue( int projectId )
+    public Boolean isProjectInPrepareBuildQueue( int projectId, int buildDefinitionId )
         throws Exception
     {
         // TODO Auto-generated method stub

Modified: continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-api/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportService.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-api/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportService.java?rev=1159065&r1=1159064&r2=1159065&view=diff
==============================================================================
--- continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-api/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportService.java (original)
+++ continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-api/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportService.java Thu Aug 18 07:08:57 2011
@@ -116,16 +116,16 @@ public interface SlaveBuildAgentTranspor
     public Boolean isProjectScmRootInQueue( int projectScmRootId, List<Integer> projectIds )
         throws Exception;
 
-    public Boolean isProjectCurrentlyBuilding( int projectId )
+    public Boolean isProjectCurrentlyBuilding( int projectId, int buildDefinitionId )
         throws Exception;
 
-    public Boolean isProjectInBuildQueue( int projectId )
+    public Boolean isProjectInBuildQueue( int projectId, int buildDefinitionId )
         throws Exception;
 
-    public Boolean isProjectCurrentlyPreparingBuild( int projectId )
+    public Boolean isProjectCurrentlyPreparingBuild( int projectId, int buildDefinitionId )
         throws Exception;
 
-    public Boolean isProjectInPrepareBuildQueue( int projectId )
+    public Boolean isProjectInPrepareBuildQueue( int projectId, int buildDefinitionId )
         throws Exception;
 
     public Boolean isProjectGroupInPrepareBuildQueue( int projectGroupId )

Modified: continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-client/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportClient.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-client/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportClient.java?rev=1159065&r1=1159064&r2=1159065&view=diff
==============================================================================
--- continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-client/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportClient.java (original)
+++ continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-client/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportClient.java Thu Aug 18 07:08:57 2011
@@ -599,77 +599,89 @@ public class SlaveBuildAgentTransportCli
         return result;
     }
 
-    public Boolean isProjectCurrentlyBuilding( int projectId )
+    public Boolean isProjectCurrentlyBuilding( int projectId, int buildDefinitionId )
         throws Exception
     {
         Boolean result;
 
         try
         {
-            result = slave.isProjectCurrentlyBuilding( projectId );
-            log.debug( "Checking if project {} is currently building in build agent {}", projectId, buildAgentUrl );
+            result = slave.isProjectCurrentlyBuilding( projectId, buildDefinitionId );
+            log.debug( "Checking if projectId={}, buildDefinitionId={} is currently building in build agent {}", 
+                       new Object[] { projectId, buildDefinitionId, buildAgentUrl } );
         }
         catch ( Exception e )
         {
-            log.error( "Failed to check if project " + projectId + " is currently building in build agent " + buildAgentUrl, e );
-            throw new Exception( "Failed to check if project " + projectId + " is currently building in build agent " + buildAgentUrl, e );
+            log.error( "Failed to check if projectId=" + projectId + ", buildDefinitionId=" + buildDefinitionId + 
+                       " is currently building in build agent " + buildAgentUrl, e );
+            throw new Exception( "Failed to check if projectId=" + projectId + ", buildDefinitionId=" + buildDefinitionId + 
+                                 " is currently building in build agent " + buildAgentUrl, e );
         }
 
         return result;
     }
 
-    public Boolean isProjectInBuildQueue( int projectId )
+    public Boolean isProjectInBuildQueue( int projectId, int buildDefinitionId )
         throws Exception
     {
         Boolean result;
 
         try
         {
-            result = slave.isProjectInBuildQueue( projectId );
-            log.debug( "Checking if project {} is in build queue of build agent {}", projectId, buildAgentUrl );
+            result = slave.isProjectInBuildQueue( projectId, buildDefinitionId );
+            log.debug( "Checking if projectId={}, buildDefinitionId={} is in build queue of build agent {}",
+                       new Object[] { projectId, buildDefinitionId, buildAgentUrl } );
         }
         catch ( Exception e )
         {
-            log.error( "Failed to check if project " + projectId + " is in build queue of build agent " + buildAgentUrl, e );
-            throw new Exception( "Failed to check if project " + projectId + " is in build queue of build agent " + buildAgentUrl, e );
+            log.error( "Failed to check if projectId=" + projectId + ", buildDefinitionId=" + buildDefinitionId + 
+                       " is in build queue of build agent " + buildAgentUrl, e );
+            throw new Exception( "Failed to check if projectId=" + projectId + ", buildDefinitionId=" + buildDefinitionId + 
+                                 " is in build queue of build agent " + buildAgentUrl, e );
         }
 
         return result;
     }
 
-    public Boolean isProjectCurrentlyPreparingBuild( int projectId )
+    public Boolean isProjectCurrentlyPreparingBuild( int projectId, int buildDefinitionId )
         throws Exception
     {
         Boolean result;
 
         try
         {
-            result = slave.isProjectCurrentlyPreparingBuild( projectId );
-            log.debug( "Checking if project {} is currently preparing build in build agent {}", projectId, buildAgentUrl );
+            result = slave.isProjectCurrentlyPreparingBuild( projectId, buildDefinitionId );
+            log.debug( "Checking if projectId={}, buildDefinitionId={} is currently preparing build in build agent {}",
+                       new Object[] { projectId, buildDefinitionId, buildAgentUrl } );
         }
         catch ( Exception e )
         {
-            log.error( "Failed to check if project " + projectId + " is currently preparing build in build agent " + buildAgentUrl, e );
-            throw new Exception( "Failed to check if project " + projectId + " is currently preparing build in build agent " + buildAgentUrl, e );
+            log.error( "Failed to check if projectId=" + projectId + ", buildDefinitionId=" + buildDefinitionId + 
+                       " is currently preparing build in build agent " + buildAgentUrl, e );
+            throw new Exception( "Failed to check if projectId=" + projectId + ", buildDefinitionId=" + buildDefinitionId + 
+                                 " is currently preparing build in build agent " + buildAgentUrl, e );
         }
 
         return result;
     }
 
-    public Boolean isProjectInPrepareBuildQueue( int projectId )
+    public Boolean isProjectInPrepareBuildQueue( int projectId, int buildDefinitionId )
         throws Exception
     {
         Boolean result;
 
         try
         {
-            result = slave.isProjectInPrepareBuildQueue( projectId );
-            log.debug( "Checking if project {} is in prepare build queue of build agent {}", projectId, buildAgentUrl );
+            result = slave.isProjectInPrepareBuildQueue( projectId, buildDefinitionId );
+            log.debug( "Checking if projectId={}, buildDefinitionId={} is in prepare build queue of build agent {}",
+                       new Object[] { projectId, buildDefinitionId, buildAgentUrl } );
         }
         catch ( Exception e )
         {
-            log.error( "Failed to check if project " + projectId + " is in prepare build queue of build agent " + buildAgentUrl, e );
-            throw new Exception( "Failed to check if project " + projectId + " is in prepare build queue of build agent " + buildAgentUrl, e );
+            log.error( "Failed to check if projectId=" + projectId + ", buildDefinitionId=" + buildDefinitionId + 
+                       " is in prepare build queue of build agent " + buildAgentUrl, e );
+            throw new Exception( "Failed to check if projectId=" + projectId + ", buildDefinitionId=" + buildDefinitionId + 
+                                 " is in prepare build queue of build agent " + buildAgentUrl, e );
         }
 
         return result;

Modified: continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-server/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportServer.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-server/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportServer.java?rev=1159065&r1=1159064&r2=1159065&view=diff
==============================================================================
--- continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-server/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportServer.java (original)
+++ continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-server/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportServer.java Thu Aug 18 07:08:57 2011
@@ -456,32 +456,32 @@ public class SlaveBuildAgentTransportSer
         return continuumBuildAgentService.isProjectScmRootInQueue( projectScmRootId, projectIds );
     }
 
-    public Boolean isProjectCurrentlyBuilding( int projectId )
+    public Boolean isProjectCurrentlyBuilding( int projectId, int buildDefinitionId )
         throws Exception
     {
-        log.info( "Checking if project {} is currently building in agent", projectId );
-        return continuumBuildAgentService.isProjectCurrentlyBuilding( projectId );
+        log.info( "Checking if projectId={}, buildDefinitionId={} is currently building in agent", projectId, buildDefinitionId );
+        return continuumBuildAgentService.isProjectCurrentlyBuilding( projectId, buildDefinitionId );
     }
 
-    public Boolean isProjectInBuildQueue( int projectId )
+    public Boolean isProjectInBuildQueue( int projectId, int buildDefinitionId )
         throws Exception
     {
-        log.info( "Checking if project {} is in build queue of agent", projectId );
-        return continuumBuildAgentService.isProjectInBuildQueue( projectId );
+        log.info( "Checking if projectId={}, buildDefinitionId={} is in build queue of agent", projectId, buildDefinitionId );
+        return continuumBuildAgentService.isProjectInBuildQueue( projectId, buildDefinitionId );
     }
 
-    public Boolean isProjectCurrentlyPreparingBuild( int projectId )
+    public Boolean isProjectCurrentlyPreparingBuild( int projectId, int buildDefinitionId )
         throws Exception
     {
-        log.info( "Checking if project '{}' is currently preparing build", projectId );
-        return continuumBuildAgentService.isProjectCurrentlyPreparingBuild( projectId );
+        log.info( "Checking if projectId={}, buildDefinitionId={} is currently preparing build", projectId, buildDefinitionId );
+        return continuumBuildAgentService.isProjectCurrentlyPreparingBuild( projectId, buildDefinitionId );
     }
 
-    public Boolean isProjectInPrepareBuildQueue( int projectId )
+    public Boolean isProjectInPrepareBuildQueue( int projectId, int buildDefinitionId )
         throws Exception
     {
-        log.info( "Checking if project '{}' is in prepare build queue", projectId );
-        return continuumBuildAgentService.isProjectInPrepareBuildQueue( projectId );
+        log.info( "Checking if projectId={}, buildDefinitionId={} is in prepare build queue", projectId, buildDefinitionId );
+        return continuumBuildAgentService.isProjectInPrepareBuildQueue( projectId, buildDefinitionId );
     }
 
     public Boolean isProjectGroupInPrepareBuildQueue( int projectGroupId )

Modified: continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-api/src/main/java/org/apache/maven/continuum/xmlrpc/ContinuumService.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-api/src/main/java/org/apache/maven/continuum/xmlrpc/ContinuumService.java?rev=1159065&r1=1159064&r2=1159065&view=diff
==============================================================================
--- continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-api/src/main/java/org/apache/maven/continuum/xmlrpc/ContinuumService.java (original)
+++ continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-api/src/main/java/org/apache/maven/continuum/xmlrpc/ContinuumService.java Thu Aug 18 07:08:57 2011
@@ -1159,6 +1159,16 @@ public interface ContinuumService
         throws Exception;
 
     /**
+     * Return true if the project is in prepare build queue
+     * 
+     * @param projectId The project id
+     * @param buildDefinitionId The build definition id
+     * @throws ContinuumException
+     */
+    boolean isProjectInPrepareBuildQueue( int projectId, int buildDefinitionId )
+        throws Exception;
+
+    /**
      * Return true if the project is in building queue.
      * 
      * @param projectId The project id
@@ -1168,9 +1178,19 @@ public interface ContinuumService
         throws Exception;
 
     /**
+     * Return true if the project is in building queue.
+     * 
+     * @param projectId The project id
+     * @param buildDefinitionId The build definition id
+     * @throws ContinuumException
+     */
+    boolean isProjectInBuildingQueue( int projectId, int buildDefinitionId )
+        throws Exception;
+
+    /**
      * Return true if the project is currently preparing build
      * 
-     * @param projectId
+     * @param projectId The project id
      * @return
      * @throws Exception
      */
@@ -1178,9 +1198,20 @@ public interface ContinuumService
         throws Exception;
 
     /**
+     * Return true if the project is currently preparing build
+     * 
+     * @param projectId The project id
+     * @param buildDefinitionId The build definition id
+     * @return
+     * @throws Exception
+     */
+    boolean isProjectCurrentlyPreparingBuild( int projectId, int buildDefinitionId )
+        throws Exception;
+
+    /**
      * Return true if the project is currently building
      * 
-     * @param projectId
+     * @param projectId The project id
      * @return
      * @throws Exception
      */
@@ -1188,6 +1219,17 @@ public interface ContinuumService
         throws Exception;
 
     /**
+     * Return true if the project is currently building
+     * 
+     * @param projectId The project id 
+     * @param buildDefinitionId The build definition id
+     * @return
+     * @throws Exception
+     */
+    boolean isProjectCurrentlyBuilding( int projectId, int buildDefinitionId )
+        throws Exception;
+
+    /**
      * Return projects building queue.
      * 
      * @throws ContinuumException
@@ -1218,10 +1260,11 @@ public interface ContinuumService
      * Cancel a project build
      * 
      * @param projectId the project id
+     * @param buildDefinitionId the build definition id
      * @return
      * @throws Exception
      */
-    boolean cancelBuild( int projectId )
+    boolean cancelBuild( int projectId, int buildDefinitionId )
         throws Exception;
 
     // ----------------------------------------------------------------------
@@ -1707,10 +1750,11 @@ public interface ContinuumService
      * Get the url of the build agent that is processing the project
      * 
      * @param projectId project Id
+     * @param buildDefinitionId build definition Id
      * 
      * @return build agent url
      */
-    String getBuildAgentUrl( int projectId ) throws Exception;
+    String getBuildAgentUrl( int projectId, int buildDefinition ) throws Exception;
 
     /**
      * Same method but compatible with standard XMLRPC

Modified: continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/client/ContinuumXmlRpcClient.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/client/ContinuumXmlRpcClient.java?rev=1159065&r1=1159064&r2=1159065&view=diff
==============================================================================
--- continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/client/ContinuumXmlRpcClient.java (original)
+++ continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/client/ContinuumXmlRpcClient.java Thu Aug 18 07:08:57 2011
@@ -566,6 +566,12 @@ public class ContinuumXmlRpcClient
         return continuum.isProjectInPrepareBuildQueue( projectId );
     }
 
+    public boolean isProjectInPrepareBuildQueue( int projectId, int buildDefinitionId )
+        throws Exception
+    {
+        return continuum.isProjectInPrepareBuildQueue( projectId, buildDefinitionId );
+    }
+
     public List<BuildProjectTask> getProjectsInBuildQueue()
         throws Exception
     {
@@ -578,18 +584,36 @@ public class ContinuumXmlRpcClient
         return continuum.isProjectInBuildingQueue( projectId );
     }
 
+    public boolean isProjectInBuildingQueue( int projectId, int buildDefinitionId )
+        throws Exception
+    {
+        return continuum.isProjectInBuildingQueue( projectId, buildDefinitionId );
+    }
+
     public boolean isProjectCurrentlyPreparingBuild( int projectId )
         throws Exception
     {
         return continuum.isProjectCurrentlyPreparingBuild( projectId );
     }
 
+    public boolean isProjectCurrentlyPreparingBuild( int projectId, int buildDefinitionId )
+        throws Exception
+    {
+        return continuum.isProjectCurrentlyPreparingBuild( projectId, buildDefinitionId );
+    }
+
     public boolean isProjectCurrentlyBuilding( int projectId )
         throws Exception
     {
         return continuum.isProjectCurrentlyBuilding( projectId );
     }
 
+    public boolean isProjectCurrentlyBuilding( int projectId, int buildDefinitionId )
+        throws Exception
+    {
+        return continuum.isProjectCurrentlyBuilding( projectId, buildDefinitionId );
+    }
+
     public int removeProjectsFromBuildingQueue( int[] projectsId )
         throws Exception
     {
@@ -602,10 +626,10 @@ public class ContinuumXmlRpcClient
         return continuum.cancelCurrentBuild();
     }
 
-    public boolean cancelBuild( int projectId )
+    public boolean cancelBuild( int projectId, int buildDefinitionId )
         throws Exception
     {
-        return continuum.cancelBuild( projectId );
+        return continuum.cancelBuild( projectId, buildDefinitionId );
     }
 
     // ----------------------------------------------------------------------
@@ -1348,9 +1372,9 @@ public class ContinuumXmlRpcClient
         return continuum.pingBuildAgent( buildAgentUrl );
     }
     
-    public String getBuildAgentUrl( int projectId )
+    public String getBuildAgentUrl( int projectId, int buildDefinitionId )
         throws Exception
     {
-        return continuum.getBuildAgentUrl( projectId );
+        return continuum.getBuildAgentUrl( projectId, buildDefinitionId );
     }
 }

Modified: continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/client/SampleClient.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/client/SampleClient.java?rev=1159065&r1=1159064&r2=1159065&view=diff
==============================================================================
--- continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/client/SampleClient.java (original)
+++ continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/client/SampleClient.java Thu Aug 18 07:08:57 2011
@@ -54,7 +54,7 @@ public class SampleClient
     {
         client = new ContinuumXmlRpcClient( new URL( args[0] ), args[1], args[2] );
 
-        /*
+
         // Test for [CONTINUUM-2641]: (test with distributed builds with multiple build agents or parallel builds with > 1 build queue)
         // make sure to set the projectIds to the actual projectIds of your projects added in Continuum
         int projectIds[] = new int[] { 2, 3, 4, 5, 6 };
@@ -89,10 +89,7 @@ public class SampleClient
         {
             thread.start();
         }
-        */
-
 
-      /*
         System.out.println( "Adding project..." );
         AddingResult result = client.addMavenTwoProject( "http://svn.apache.org/repos/asf/continuum/sandbox/simple-example/pom.xml" );
         if ( result.hasErrors() )
@@ -134,15 +131,14 @@ public class SampleClient
             Thread.sleep( 1000 );
         }
 
-        System.out.println();    */
+        System.out.println();
 
         BuildDefinition buildDef = new BuildDefinition();
         buildDef.setArguments( "A-Za-z0-9_./=,\": \\-" );
         buildDef.setSchedule( client.getSchedule( 1 ) );
         client.addBuildDefinitionToProjectGroup( 1, buildDef );
-        
-        /*
-        ProjectSummary ps = client.getProjectSummary( 1 );
+
+        ps = client.getProjectSummary( 1 );
         System.out.println( "Add the project to the build queue." );
         BuildTrigger trigger = new BuildTrigger();
         trigger.setTrigger( 1 );
@@ -191,7 +187,7 @@ public class SampleClient
         }
         System.out.println( "Done.");
 
-        System.out.println();/*
+        System.out.println();
 
         System.out.println( "Projects list." );
         System.out.println( "=====================" );
@@ -271,7 +267,7 @@ public class SampleClient
         System.out.println( "Removing Local Repository '" + repository.getName() + "' (" + 
                             repository.getId() + ")..." );
         client.removeLocalRepository( repository.getId() );
-        System.out.println( "Done." );*/
+        System.out.println( "Done." );
     }
 
     public static void printProjectGroupSummary( ProjectGroupSummary pg )

Modified: continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumServiceImpl.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumServiceImpl.java?rev=1159065&r1=1159064&r2=1159065&view=diff
==============================================================================
--- continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumServiceImpl.java (original)
+++ continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumServiceImpl.java Thu Aug 18 07:08:57 2011
@@ -1325,15 +1325,20 @@ public class ContinuumServiceImpl
     // ----------------------------------------------------------------------
     // Queue
     // ----------------------------------------------------------------------
-
     public boolean isProjectInPrepareBuildQueue( int projectId )
         throws ContinuumException
     {
+        return isProjectInPrepareBuildQueue( projectId, -1 );
+    }
+    
+    public boolean isProjectInPrepareBuildQueue( int projectId, int buildDefinitionId )
+        throws ContinuumException
+    {
         try
         {
             if ( continuum.getConfiguration().isDistributedBuildEnabled() )
             {
-                return distributedBuildManager.isProjectInAnyPrepareBuildQueue( projectId, -1 );
+                return distributedBuildManager.isProjectInAnyPrepareBuildQueue( projectId, buildDefinitionId );
             }
             else
             {
@@ -1349,11 +1354,17 @@ public class ContinuumServiceImpl
     public boolean isProjectInBuildingQueue( int projectId )
         throws ContinuumException
     {
+        return isProjectInBuildingQueue( projectId, -1 );
+    }
+
+    public boolean isProjectInBuildingQueue( int projectId, int buildDefinitionId )
+        throws ContinuumException
+    {
         try
         {
             if ( continuum.getConfiguration().isDistributedBuildEnabled() )
             {
-                return distributedBuildManager.isProjectInAnyBuildQueue( projectId, -1 );
+                return distributedBuildManager.isProjectInAnyBuildQueue( projectId, buildDefinitionId );
             }
             else
             {
@@ -1369,11 +1380,17 @@ public class ContinuumServiceImpl
     public boolean isProjectCurrentlyPreparingBuild( int projectId )
         throws ContinuumException
     {
+        return isProjectCurrentlyPreparingBuild( projectId, -1 );
+    }
+
+    public boolean isProjectCurrentlyPreparingBuild( int projectId, int buildDefinitionId )
+        throws ContinuumException
+    {
         try
         {
             if ( continuum.getConfiguration().isDistributedBuildEnabled() )
             {
-                return distributedBuildManager.isProjectCurrentlyPreparingBuild( projectId, -1 );
+                return distributedBuildManager.isProjectCurrentlyPreparingBuild( projectId, buildDefinitionId );
             }
             else
             {
@@ -1389,11 +1406,17 @@ public class ContinuumServiceImpl
     public boolean isProjectCurrentlyBuilding( int projectId )
         throws ContinuumException
     {
+        return isProjectCurrentlyBuilding( projectId, -1 );
+    }
+
+    public boolean isProjectCurrentlyBuilding( int projectId, int buildDefinitionId )
+        throws ContinuumException
+    {
         try
         {
             if ( continuum.getConfiguration().isDistributedBuildEnabled() )
             {
-                return distributedBuildManager.isProjectCurrentlyBuilding( projectId, -1 );
+                return distributedBuildManager.isProjectCurrentlyBuilding( projectId, buildDefinitionId );
             }
             else
             {
@@ -1467,7 +1490,7 @@ public class ContinuumServiceImpl
         }
     }
 
-    public boolean cancelBuild( int projectId )
+    public boolean cancelBuild( int projectId, int buildDefinitionId )
         throws ContinuumException
     {
         checkManageQueuesAuthorization();
@@ -1477,9 +1500,9 @@ public class ContinuumServiceImpl
             {
                 DistributedBuildManager dbm = continuum.getDistributedBuildManager();
 
-                String buildAgentUrl = dbm.getBuildAgentUrl( projectId );
+                String buildAgentUrl = dbm.getBuildAgentUrl( projectId, buildDefinitionId );
 
-                if ( dbm.isProjectInAnyPrepareBuildQueue( projectId, -1 ) )
+                if ( dbm.isProjectInAnyPrepareBuildQueue( projectId, buildDefinitionId ) )
                 {
                     if ( buildAgentUrl != null )
                     {
@@ -1490,9 +1513,9 @@ public class ContinuumServiceImpl
                     }
                 }
                 // wait if already preparing
-                else if ( dbm.isProjectCurrentlyPreparingBuild( projectId, -1 ) )
+                else if ( dbm.isProjectCurrentlyPreparingBuild( projectId, buildDefinitionId ) )
                 {
-                    while ( dbm.isProjectCurrentlyPreparingBuild( projectId, -1 ) )
+                    while ( dbm.isProjectCurrentlyPreparingBuild( projectId, buildDefinitionId ) )
                     {
                         try
                         {
@@ -1506,11 +1529,11 @@ public class ContinuumServiceImpl
                 }
 
                 
-                if ( dbm.isProjectInAnyBuildQueue( projectId, -1 ) )
+                if ( dbm.isProjectInAnyBuildQueue( projectId, buildDefinitionId ) )
                 {
-                    dbm.removeFromBuildQueue( buildAgentUrl, projectId, -1 );
+                    dbm.removeFromBuildQueue( buildAgentUrl, projectId, buildDefinitionId );
                 }
-                else if ( dbm.isProjectCurrentlyBuilding( projectId, -1 ) )
+                else if ( dbm.isProjectCurrentlyBuilding( projectId, buildDefinitionId ) )
                 {
                     if ( buildAgentUrl != null )
                     {
@@ -1972,16 +1995,16 @@ public class ContinuumServiceImpl
      * 
      * @throws ContinuumException distributed build is not enabled or error during retrieval of build agent url
      * 
-     *  @see DistributedBuildManager#getBuildAgentUrl(int)
+     *  @see DistributedBuildManager#getBuildAgentUrl(int, int)
      */
-    public String getBuildAgentUrl( int projectId ) throws ContinuumException
+    public String getBuildAgentUrl( int projectId, int buildDefinitionId ) throws ContinuumException
     {
         if ( !continuum.getConfiguration().isDistributedBuildEnabled() )
         {
             throw new ContinuumException( "Method available only in distributed build mode." );
         }
         
-        return distributedBuildManager.getBuildAgentUrl( projectId );
+        return distributedBuildManager.getBuildAgentUrl( projectId, buildDefinitionId );
     }
 
     public BuildAgentConfiguration updateBuildAgent( BuildAgentConfiguration buildAgentConfiguration )

Modified: continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/test/java/org/apache/continuum/xmlrpc/server/ContinuumServiceImplTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/test/java/org/apache/continuum/xmlrpc/server/ContinuumServiceImplTest.java?rev=1159065&r1=1159064&r2=1159065&view=diff
==============================================================================
--- continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/test/java/org/apache/continuum/xmlrpc/server/ContinuumServiceImplTest.java (original)
+++ continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/test/java/org/apache/continuum/xmlrpc/server/ContinuumServiceImplTest.java Thu Aug 18 07:08:57 2011
@@ -280,11 +280,11 @@ public class ContinuumServiceImplTest
                 one( configurationService ).isDistributedBuildEnabled();
                 will( returnValue ( true ) );
                 
-                one( distributedBuildManager ).getBuildAgentUrl( 1 );
+                one( distributedBuildManager ).getBuildAgentUrl( 1, 1 );
                 will( returnValue( "http://localhost:8181/continuum-buildagent/xmlrpc" ) );
             }
         });
-        String buildAgentUrl = continuumService.getBuildAgentUrl( 1 );
+        String buildAgentUrl = continuumService.getBuildAgentUrl( 1, 1 );
         assertEquals( "http://localhost:8181/continuum-buildagent/xmlrpc", buildAgentUrl );
 
         context.assertIsSatisfied();
@@ -305,7 +305,7 @@ public class ContinuumServiceImplTest
 
         try 
         {
-            String buildAgentUrl = continuumService.getBuildAgentUrl( 1 );
+            String buildAgentUrl = continuumService.getBuildAgentUrl( 1, 1 );
             fail ( "ContinuumException is expected to occur here." ); 
         } 
         catch ( ContinuumException e )



Mime
View raw message