From: Bryan T. <tho...@us...> - 2007-04-23 23:44:47
|
Update of /cvsroot/cweb/bigdata/src/test/com/bigdata/service In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv12159/src/test/com/bigdata/service Modified Files: TestMetadataServer0.java TestAll.java Added Files: TestBigdataClient.java Log Message: Expanding on the client and its test suite. --- NEW FILE: TestBigdataClient.java --- /** The Notice below must appear in each file of the Source Code of any copy you distribute of the Licensed Product. Contributors to any Modifications may add their own copyright notices to identify their own contributions. License: The contents of this file are subject to the CognitiveWeb Open Source License Version 1.1 (the License). You may not copy or use this file, in either source code or executable form, except in compliance with the License. You may obtain a copy of the License from http://www.CognitiveWeb.org/legal/license/ Software distributed under the License is distributed on an AS IS basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. Copyrights: Portions created by or assigned to CognitiveWeb are Copyright (c) 2003-2003 CognitiveWeb. All Rights Reserved. Contact information for CognitiveWeb is available at http://www.CognitiveWeb.org Portions Copyright (c) 2002-2003 Bryan Thompson. Acknowledgements: Special thanks to the developers of the Jabber Open Source License 1.0 (JOSL), from which this License was derived. This License contains terms that differ from JOSL. Special thanks to the CognitiveWeb Open Source Contributors for their suggestions and support of the Cognitive Web. Modifications: */ /* * Created on Apr 23, 2007 */ package com.bigdata.service; /** * Test suite for the {@link BigdataClient}. * * @author <a href="mailto:tho...@us...">Bryan Thompson</a> * @version $Id$ */ public class TestBigdataClient extends AbstractServerTestCase { public TestBigdataClient() { } public TestBigdataClient(String name) { super(name); } /** * Starts in {@link #setUp()}. */ MetadataServer metadataServer0; /** * Starts in {@link #setUp()}. */ DataServer dataServer1; /** * Starts in {@link #setUp()}. */ DataServer dataServer0; /** * Starts in {@link #setUp()}. */ BigdataClient client; /** * Starts a {@link DataServer} ({@link #dataServer1}) and then a * {@link MetadataServer} ({@link #metadataServer0}). Each runs in its own * thread. */ public void setUp() throws Exception { /* * Start up a data server before the metadata server so that we can make * sure that it is detected by the metadata server once it starts up. */ dataServer1 = new DataServer( new String[] { "src/resources/config/standalone/DataServer1.config" }); new Thread() { public void run() { dataServer1.run(); } }.start(); /* * Start the metadata server. */ metadataServer0 = new MetadataServer( new String[] { "src/resources/config/standalone/MetadataServer0.config" }); new Thread() { public void run() { metadataServer0.run(); } }.start(); /* * Start up a data server after the metadata server so that we can make * sure that it is detected by the metadata server once it starts up. */ dataServer0 = new DataServer( new String[] { "src/resources/config/standalone/DataServer0.config" }); new Thread() { public void run() { dataServer0.run(); } }.start(); client = new BigdataClient( new String[] { "src/resources/config/standalone/Client.config" }); } /** * Destroy the test services. */ public void tearDown() throws Exception { if(metadataServer0!=null) { metadataServer0.destroy(); metadataServer0 = null; } if(dataServer0!=null) { dataServer0.destroy(); dataServer0 = null; } if (dataServer1 != null) { dataServer1.destroy(); dataServer1 = null; } if(client!=null) { client.terminate(); client = null; } } public void test_federationRunning() throws Exception { assertNotNull("metadataService", client.getMetadataService()); } } Index: TestMetadataServer0.java =================================================================== RCS file: /cvsroot/cweb/bigdata/src/test/com/bigdata/service/TestMetadataServer0.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TestMetadataServer0.java 23 Apr 2007 18:58:38 -0000 1.3 --- TestMetadataServer0.java 23 Apr 2007 23:44:41 -0000 1.4 *************** *** 355,359 **** { ! ServiceID serviceID = MetadataServer.uuid2ServiceID(pmd.getDataServices()[0]); // @todo use lookup cache in a real client. --- 355,359 ---- { ! ServiceID serviceID = JiniUtil.uuid2ServiceID(pmd.getDataServices()[0]); // @todo use lookup cache in a real client. Index: TestAll.java =================================================================== RCS file: /cvsroot/cweb/bigdata/src/test/com/bigdata/service/TestAll.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TestAll.java 23 Apr 2007 13:09:30 -0000 1.3 --- TestAll.java 23 Apr 2007 23:44:41 -0000 1.4 *************** *** 82,85 **** --- 82,90 ---- suite.addTestSuite( TestMetadataServer0.class ); + /* + * Test of a single client talking to a bigdata federation. + */ + suite.addTestSuite( TestBigdataClient.class ); + // suite.addTestSuite( TestServer.class ); // Does not implement TestCase. |