From: <ble...@us...> - 2010-09-22 18:51:10
|
Revision: 3610 http://bigdata.svn.sourceforge.net/bigdata/?rev=3610&view=rev Author: blevine218 Date: 2010-09-22 18:51:04 +0000 (Wed, 22 Sep 2010) Log Message: ----------- Remove our Assert subclass and all references to it. Modified Paths: -------------- branches/maven_scaleout/bigdata-integ/src/test/java/com/bigdata/jini/start/AbstractFedZooTestCase.java branches/maven_scaleout/bigdata-integ/src/test/java/com/bigdata/jini/start/TestJiniCoreServicesProcessHelper.java branches/maven_scaleout/bigdata-integ/src/test/java/com/bigdata/jini/start/TestServiceConfigurationMonitoring.java branches/maven_scaleout/bigdata-integ/src/test/java/com/bigdata/jini/start/TestServiceConfigurationZNodeEnum.java branches/maven_scaleout/bigdata-integ/src/test/java/com/bigdata/jini/start/TestServiceStarter.java branches/maven_scaleout/bigdata-integ/src/test/java/com/bigdata/service/jini/AbstractServerTestCase.java branches/maven_scaleout/bigdata-integ/src/test/java/com/bigdata/service/jini/TestBigdataClient.java Removed Paths: ------------- branches/maven_scaleout/bigdata-integ/src/test/java/com/bigdata/test/util/Assert.java Modified: branches/maven_scaleout/bigdata-integ/src/test/java/com/bigdata/jini/start/AbstractFedZooTestCase.java =================================================================== --- branches/maven_scaleout/bigdata-integ/src/test/java/com/bigdata/jini/start/AbstractFedZooTestCase.java 2010-09-22 18:23:59 UTC (rev 3609) +++ branches/maven_scaleout/bigdata-integ/src/test/java/com/bigdata/jini/start/AbstractFedZooTestCase.java 2010-09-22 18:51:04 UTC (rev 3610) @@ -39,15 +39,17 @@ import org.apache.zookeeper.ZooDefs.Ids; import org.apache.zookeeper.data.ACL; +import org.junit.Assert; + import com.bigdata.jini.start.config.ZookeeperClientConfig; import com.bigdata.jini.start.process.ProcessHelper; import com.bigdata.jini.start.process.ZookeeperProcessHelper; import com.bigdata.resources.ResourceFileFilter; import com.bigdata.service.jini.JiniClient; import com.bigdata.service.jini.JiniFederation; -import com.bigdata.test.util.Assert; + /** * Abstract base class for unit tests requiring a running zookeeper and a * running federation as configured from a test resource. Modified: branches/maven_scaleout/bigdata-integ/src/test/java/com/bigdata/jini/start/TestJiniCoreServicesProcessHelper.java =================================================================== --- branches/maven_scaleout/bigdata-integ/src/test/java/com/bigdata/jini/start/TestJiniCoreServicesProcessHelper.java 2010-09-22 18:23:59 UTC (rev 3609) +++ branches/maven_scaleout/bigdata-integ/src/test/java/com/bigdata/jini/start/TestJiniCoreServicesProcessHelper.java 2010-09-22 18:51:04 UTC (rev 3610) @@ -31,6 +31,7 @@ import java.util.List; import java.util.concurrent.TimeUnit; +import org.junit.Assert; import org.junit.Before; import org.junit.Test; @@ -50,8 +51,8 @@ import com.bigdata.jini.util.ConfigMath; import com.bigdata.service.jini.JiniClientConfig; import com.bigdata.service.jini.util.JiniServicesHelper; -import com.bigdata.test.util.Assert; + /** * Test suite for the {@link JiniCoreServicesProcessHelper} * Modified: branches/maven_scaleout/bigdata-integ/src/test/java/com/bigdata/jini/start/TestServiceConfigurationMonitoring.java =================================================================== --- branches/maven_scaleout/bigdata-integ/src/test/java/com/bigdata/jini/start/TestServiceConfigurationMonitoring.java 2010-09-22 18:23:59 UTC (rev 3609) +++ branches/maven_scaleout/bigdata-integ/src/test/java/com/bigdata/jini/start/TestServiceConfigurationMonitoring.java 2010-09-22 18:51:04 UTC (rev 3610) @@ -36,7 +36,9 @@ import org.apache.zookeeper.CreateMode; import org.apache.zookeeper.KeeperException; import org.apache.zookeeper.ZooKeeper; + import org.junit.After; +import org.junit.Assert; import org.junit.Before; import org.junit.Rule; import org.junit.Test; @@ -46,8 +48,8 @@ import com.bigdata.jini.start.config.ServiceConfiguration; import com.bigdata.jini.start.config.TransactionServerConfiguration; import com.bigdata.service.jini.TransactionServer; -import com.bigdata.test.util.Assert; + /** * Test suite for monitoring state changes for a {@link ServiceConfiguration} * and creating a new physical service instance. Modified: branches/maven_scaleout/bigdata-integ/src/test/java/com/bigdata/jini/start/TestServiceConfigurationZNodeEnum.java =================================================================== --- branches/maven_scaleout/bigdata-integ/src/test/java/com/bigdata/jini/start/TestServiceConfigurationZNodeEnum.java 2010-09-22 18:23:59 UTC (rev 3609) +++ branches/maven_scaleout/bigdata-integ/src/test/java/com/bigdata/jini/start/TestServiceConfigurationZNodeEnum.java 2010-09-22 18:51:04 UTC (rev 3610) @@ -27,12 +27,13 @@ package com.bigdata.jini.start; +import org.junit.Assert; import org.junit.Test; import com.bigdata.service.jini.TransactionServer; -import com.bigdata.test.util.Assert; + /** * Test suite for {@link ServiceConfigurationZNodeEnum}. * Modified: branches/maven_scaleout/bigdata-integ/src/test/java/com/bigdata/jini/start/TestServiceStarter.java =================================================================== --- branches/maven_scaleout/bigdata-integ/src/test/java/com/bigdata/jini/start/TestServiceStarter.java 2010-09-22 18:23:59 UTC (rev 3609) +++ branches/maven_scaleout/bigdata-integ/src/test/java/com/bigdata/jini/start/TestServiceStarter.java 2010-09-22 18:51:04 UTC (rev 3610) @@ -42,7 +42,9 @@ import org.apache.zookeeper.CreateMode; import org.apache.zookeeper.ZooKeeper; import org.apache.zookeeper.data.Stat; + import org.junit.After; +import org.junit.Assert; import org.junit.Before; import org.junit.Test; @@ -57,7 +59,6 @@ import com.bigdata.service.Service; import com.bigdata.service.jini.RemoteDestroyAdmin; import com.bigdata.service.jini.TransactionServer; -import com.bigdata.test.util.Assert; import com.bigdata.zookeeper.ZNodeDeletedWatcher; import com.bigdata.zookeeper.ZooHelper; Modified: branches/maven_scaleout/bigdata-integ/src/test/java/com/bigdata/service/jini/AbstractServerTestCase.java =================================================================== --- branches/maven_scaleout/bigdata-integ/src/test/java/com/bigdata/service/jini/AbstractServerTestCase.java 2010-09-22 18:23:59 UTC (rev 3609) +++ branches/maven_scaleout/bigdata-integ/src/test/java/com/bigdata/service/jini/AbstractServerTestCase.java 2010-09-22 18:51:04 UTC (rev 3610) @@ -36,6 +36,8 @@ import net.jini.core.lookup.ServiceRegistrar; import net.jini.core.lookup.ServiceTemplate; +import org.junit.Assert; + import com.bigdata.journal.ITx; import com.bigdata.mdi.IResourceMetadata; import com.bigdata.mdi.LocalPartitionMetadata; @@ -43,7 +45,6 @@ import com.bigdata.service.DataService; import com.bigdata.service.IDataService; import com.bigdata.service.MetadataService; -import com.bigdata.test.util.Assert; import com.sun.jini.tool.ClassServer; import com.bigdata.util.config.NicUtil; Modified: branches/maven_scaleout/bigdata-integ/src/test/java/com/bigdata/service/jini/TestBigdataClient.java =================================================================== --- branches/maven_scaleout/bigdata-integ/src/test/java/com/bigdata/service/jini/TestBigdataClient.java 2010-09-22 18:23:59 UTC (rev 3609) +++ branches/maven_scaleout/bigdata-integ/src/test/java/com/bigdata/service/jini/TestBigdataClient.java 2010-09-22 18:51:04 UTC (rev 3610) @@ -32,6 +32,7 @@ import java.util.UUID; import org.junit.After; +import org.junit.Assert; import org.junit.Before; import org.junit.Test; @@ -46,7 +47,6 @@ import com.bigdata.service.IBigdataFederation; import com.bigdata.service.IDataService; import com.bigdata.service.jini.util.JiniServicesHelper; -import com.bigdata.test.util.Assert; import com.bigdata.test.util.Util; /** @@ -198,8 +198,8 @@ while (itr.hasNext()) { final ITuple<?> tuple = itr.next(); - Assert.assertEquals(keys[i], tuple.getKey()); - Assert.assertEquals(vals[i], tuple.getValue()); + Assert.assertArrayEquals(keys[i], tuple.getKey()); + Assert.assertArrayEquals(vals[i], tuple.getValue()); i++; } Deleted: branches/maven_scaleout/bigdata-integ/src/test/java/com/bigdata/test/util/Assert.java =================================================================== --- branches/maven_scaleout/bigdata-integ/src/test/java/com/bigdata/test/util/Assert.java 2010-09-22 18:23:59 UTC (rev 3609) +++ branches/maven_scaleout/bigdata-integ/src/test/java/com/bigdata/test/util/Assert.java 2010-09-22 18:51:04 UTC (rev 3610) @@ -1,82 +0,0 @@ -/** - -Copyright (C) SYSTAP, LLC 2006-2007. All rights reserved. - -Contact: - SYSTAP, LLC - 4501 Tower Road - Greensboro, NC 27410 - lic...@bi... - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; version 2 of the License. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ -package com.bigdata.test.util; - - -/** - * Utility class that extends JUnit's Assert class with additional utilities. - * - * @author blevine - * - */ -public class Assert extends org.junit.Assert -{ - public static void assertEquals(byte[] expected, byte[] actual) - { - assertEquals(null, expected, actual); - } - public static void assertEquals(String message, byte[] expected, byte[] actual) - { - if (expected == null && actual == null) - { - return; - } - - if ( (expected == null) && (actual != null) ) - { - assertNull(message, actual); - } - - if ( (expected != null) && (actual == null) ) - { - assertNotNull(message, actual); - } - - if (expected.length != actual.length) - { - String msg = "(array lengths do not match)."; - - if (message != null) - { - msg = message + " " + msg; - } - - fail(msg); - } - - for (int i = 0; i < expected.length; i++) - { - if (expected[i] != actual[i]) - { - String msg = "(index = i)."; - - if (message != null) - { - msg = message + " " + msg; - } - assertEquals(msg, expected[i], actual[i]); - } - } - } -} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |