Show
Ignore:
Timestamp:
06/02/10 21:12:11 (2 years ago)
Author:
bturner
Message:

using maven seems to instantiate the server differently than with ant -- avoid creating it on each test

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/org.bridgedb.server/test/org/bridgedb/server/Test.java

    r308 r395  
    3434{ 
    3535        private IDMapper mapper; 
     36        private Server server; 
    3637         
    3738        @Override 
    3839        protected void setUp() throws Exception { 
     40             
     41            if (server == null) 
     42        { 
     43            server = new Server(); 
     44            server.run(8183, null); 
     45        } 
    3946                if(mapper == null) { 
    4047                        // Start local service 
    41                         Server server = new Server(); 
    42                         server.run(8183, null); 
     48                 
    4349 
    4450                        // Create a client 
     
    4652                        mapper = BridgeDb.connect("idmapper-bridgerest:http://localhost:8183/Human"); 
    4753                } 
     54                 
    4855        } 
     56         
     57         
    4958 
    50         public IDMapper getLocalService() { 
     59        @Override 
     60    protected void tearDown() throws Exception 
     61    { 
     62        // TODO Auto-generated method stub 
     63        super.tearDown(); 
     64        server.stop(); 
     65    } 
     66 
     67 
     68 
     69    public IDMapper getLocalService() { 
    5170                return mapper; 
    5271        }