Examples of CruisecontrolServer


Examples of net.sourceforge.cruisecontrol.monitoring.CruisecontrolServer

   
    splitNodeEditor = new JSplitPane(JSplitPane.VERTICAL_SPLIT, true, editorPane, htmlScrollPane);
    nodeEditor.add(BorderLayout.CENTER, splitNodeEditor);
    splitNodeEditor.setDividerLocation(250);
   
    CruisecontrolServer server = getServer();
    ConfigTree configTree = new ConfigTree(server);
    projectBrowser.add(BorderLayout.CENTER, configTree);
   
    //Map GUI North and South right side to nodes
    TreeNodeListener treeListener = new TreeNodeListener(){
View Full Code Here

Examples of net.sourceforge.cruisecontrol.monitoring.CruisecontrolServer

        catch( Exception e ) {
            displayError( "Error populating servers", "Unable to build servers list: " + e.getMessage() );
        }
       
        for ( int index = 0;index < theServers.size();index++ ) {
            CruisecontrolServer theServer = (CruisecontrolServer) theServers.get(index);

      ServerPanel theContentPanel = new ServerPanel(theServer, index, ServersPanel.this );
     
      serverTabPane.addTab( theServer.getName(),
                        theImage,
                        (JComponent) theContentPanel );
     
      theContentPanel.startMonitoring();
        }
View Full Code Here

Examples of net.sourceforge.cruisecontrol.monitoring.CruisecontrolServer

   
    return new Dimension( 600, 300 );
  }

    public void addServer() {
        CruisecontrolServer theNewServer = CruisecontrolServerManager.createNewServer();
        theNewServer.setName( "New Server" );
       
        serverListModel.addElement(theNewServer);
       
        serverList.setSelectedValue( theNewServer, true );
    }
View Full Code Here

Examples of net.sourceforge.cruisecontrol.monitoring.CruisecontrolServer

        serverList.setSelectedValue( theNewServer, true );
    }

    public void removeServer() {
       
      CruisecontrolServer theSelectedServer = getSelectedServer();
     
        if ( theSelectedServer != null ) {

          serverListModel.removeElement(theSelectedServer);
      removedServers.add(theSelectedServer);
View Full Code Here

Examples of net.sourceforge.cruisecontrol.monitoring.CruisecontrolServer

*/
public class TestCruisecontrolServer extends TestCase {

  public void testServerStatusFor() {
   
    CruisecontrolServer theTestServer = new CruisecontrolServer();
    String serverName = "Foo";
    theTestServer.setName( serverName );
   
    Collection theProjects = new ArrayList();
   
    MockProject theCurrentTest = new MockProject();
    theCurrentTest.setServerName( serverName );
    theCurrentTest.setProjectStatus( "waiting for build" );
    theProjects.add( theCurrentTest );
   
    String theTestStatus = theTestServer.getCurrentStatusFor( theProjects );
    assertEquals( ProjectStatus.SUCCESS, theTestStatus );

    theCurrentTest = new MockProject();
    theCurrentTest.setServerName( serverName );
    theCurrentTest.setProjectStatus( "waiting for build" );
    theCurrentTest.setLastBuildResult( ProjectStatus.FAILURE );
    theProjects.add( theCurrentTest );
   
    theTestStatus = theTestServer.getCurrentStatusFor( theProjects );
    assertEquals( ProjectStatus.FAILURE, theTestStatus );
   
    theCurrentTest = new MockProject();
    theCurrentTest.setServerName( serverName );
    theCurrentTest.setProjectStatus( "looking for modifications" );
    theProjects.add( theCurrentTest );
   
    theTestStatus = theTestServer.getCurrentStatusFor( theProjects );
    assertEquals( ProjectStatus.BUILDING, theTestStatus );
  }
View Full Code Here

Examples of net.sourceforge.cruisecontrol.monitoring.CruisecontrolServer

        // note: test-files/new_config.xml should not exist throughout entire test.
        List theServers = CruisecontrolServerManager.getServers( "test-files/new_config.xml" );
       
        assertTrue( "No servers found", theServers.size() == 1 );
       
        CruisecontrolServer theServer = (CruisecontrolServer) theServers.iterator().next();
        assertEquals( "Server not set", "localhost", theServer.getHost() );
        assertEquals( "Server name not set", "Default Server", theServer.getName() );
        assertEquals( "Server rmi port not set",
                CruisecontrolServerManager.DEFAULT_SERVER_RMI_PORT, theServer.getRmiPort() );
        assertEquals( "Server Reporting port not set",
                CruisecontrolServerManager.DEFAULT_REPORTING_SERVER_PORT, theServer.getReportingServerPort() );
        assertEquals( "Server Reporting time not set",
                Integer.valueOf( CruisecontrolServerManager.DEFAULT_MONITORING_TIME ).intValue(), theServer.getMonitorTime() );
    }
View Full Code Here

Examples of net.sourceforge.cruisecontrol.monitoring.CruisecontrolServer

   
    List theServers = CruisecontrolServerManager.getServers( "test-files/server_config1.xml" );
   
    assertTrue( "No servers found", theServers.size() == 1 );
   
    CruisecontrolServer theServer = (CruisecontrolServer) theServers.iterator().next();
   
    assertEquals( "Server port not set", "9999", theServer.getRmiPort());
    assertEquals( "Server not set", "localhost", theServer.getHost());
  }
View Full Code Here

Examples of net.sourceforge.cruisecontrol.monitoring.CruisecontrolServer

   
    public void testSaveServers() throws Exception {
       
        List theServers = new ArrayList();
       
        CruisecontrolServer theNewServer = new CruisecontrolServer( new Element("server") );
        theNewServer.setHost( "10.10.10.10" );
        theNewServer.setName( "My New Server" );
        theNewServer.setRmiPort( "21" );
        theNewServer.setJmxPort( "10" );
       
        assertEquals( "Host not set.", "10.10.10.10", theNewServer.getHost() );
        assertEquals( "Name not set", "My New Server", theNewServer.getName() );
        assertEquals( "Rmi port not set", "21", theNewServer.getRmiPort() );
        assertEquals( "JMX port not set", "10", theNewServer.getJmxPort() );
       
        theServers.add( theNewServer );
       
        CruisecontrolServerManager.resetServers();
        CruisecontrolServerManager.saveServers( theServers, "test-files/server_config2.xml" );
       
        theServers = CruisecontrolServerManager.getServers( "test-files/server_config2.xml" );
       
        assertEquals( "Server size not correct.", 1, theServers.size() );
       
        theNewServer = (CruisecontrolServer) theServers.get(0);
        assertEquals( "Host not set.", "10.10.10.10", theNewServer.getHost() );
        assertEquals( "Name not set", "My New Server", theNewServer.getName() );
        assertEquals( "Rmi port not set", "21", theNewServer.getRmiPort() );
        assertEquals( "JMX port not set", "10", theNewServer.getJmxPort() );
   
    theServers.remove( theNewServer );
        CruisecontrolServerManager.removeServer( theNewServer );
        CruisecontrolServerManager.saveServers( theServers, "test-files/server_config2.xml" );
       
View Full Code Here

Examples of net.sourceforge.cruisecontrol.monitoring.CruisecontrolServer

    }

    public void testServerProjectAttributes() throws Exception {
        List theServers = new ArrayList();
       
        CruisecontrolServer theNewServer = new CruisecontrolServer( new Element("server") );
        theNewServer.setHost( "10.10.10.10" );
        theNewServer.setName( "My New Server" );
        theNewServer.setRmiPort( "21" );
        theNewServer.setJmxPort( "10" );

        ArrayList attributesList = new ArrayList();
        attributesList.add( new ProjectMonitorAttribute( "Name", "projectName" ) );
       
        theNewServer.setProjectAttributes( attributesList );
       
        theServers.add( theNewServer );
       
        CruisecontrolServerManager.resetServers();
        CruisecontrolServerManager.saveServers( theServers, "test-files/server_config3.xml" );
       
        theServers = CruisecontrolServerManager.getServers( "test-files/server_config3.xml" );
       
        theNewServer = (CruisecontrolServer) theServers.get(0);
        List projectAttributes = theNewServer.getProjectAttributes();
    assertEquals( "Attributes not built", 1, projectAttributes.size() );
       
        ProjectMonitorAttribute attribute = (ProjectMonitorAttribute) projectAttributes.get(0);
        assertEquals( "Name not set", "Name", attribute.getName() );
        assertEquals( "Method Name not set", "projectName", attribute.getMethodName() );
View Full Code Here

Examples of net.sourceforge.cruisecontrol.monitoring.CruisecontrolServer

        }
    }

  public void forceConfigReload() {
      try {
        CruisecontrolServer selectServer = selectServer();
      selectServer.forceConfigReload();
      refreshProjects( getServerProjects( selectServer ) );
      }
      catch ( RuntimeException re ) {
        displayError( "Error Forcing Reload", re.getMessage() );
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.