geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: incubator-geronimo/modules/transaction/src/java/org/apache/geronimo/transaction UserTransactionImpl.java
Date Thu, 08 Apr 2004 05:22:15 GMT
dain        2004/04/07 22:22:15

  Modified:    etc      global.properties
               modules/kernel/src/java/org/apache/geronimo/kernel/jmx
                        MBeanProxyFactory.java
               modules/kernel/src/test/org/apache/geronimo/gbean/jmx
                        GBeanMBeanAttributeTest.java
               modules/naming/src/java/org/apache/geronimo/naming/deployment
                        LocalRefDConfigBean.java
               modules/network/src/java/org/apache/geronimo/network/protocol/control
                        ControlClientProtocol.java
               modules/network/src/test/org/apache/geronimo/network/protocol/control
                        ControlProtocolTest.java
               modules/transaction/src/java/org/apache/geronimo/transaction
                        UserTransactionImpl.java
  Added:       modules/connector project.properties
  Log:
  Enabled asserts in unit tests
  Fixed problems with bad asserts
  
  Revision  Changes    Path
  1.11      +2 -1      incubator-geronimo/etc/global.properties
  
  Index: global.properties
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/etc/global.properties,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- global.properties	22 Mar 2004 00:30:19 -0000	1.10
  +++ global.properties	8 Apr 2004 05:22:15 -0000	1.11
  @@ -32,6 +32,7 @@
   maven.compile.optimize=true
   
   maven.junit.fork=true
  +maven.junit.jvmargs=-ea
   
   #maven.war.final.name=${pom.artifactId}-${pom.currentVersion}.war
   
  
  
  
  1.3       +1 -4      incubator-geronimo/modules/connector/project.properties
  
  
  
  
  1.9       +1 -2      incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/kernel/jmx/MBeanProxyFactory.java
  
  Index: MBeanProxyFactory.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/kernel/jmx/MBeanProxyFactory.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- MBeanProxyFactory.java	10 Mar 2004 09:59:01 -0000	1.8
  +++ MBeanProxyFactory.java	8 Apr 2004 05:22:15 -0000	1.9
  @@ -42,7 +42,6 @@
        */
       public static Object getProxy(Class type, MBeanServer server, ObjectName objectName)
throws Exception {
           assert type != null;
  -        assert type.isInterface();
           assert server != null;
   
           if (objectName.isPattern()) {
  
  
  
  1.3       +6 -7      incubator-geronimo/modules/kernel/src/test/org/apache/geronimo/gbean/jmx/GBeanMBeanAttributeTest.java
  
  Index: GBeanMBeanAttributeTest.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/kernel/src/test/org/apache/geronimo/gbean/jmx/GBeanMBeanAttributeTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- GBeanMBeanAttributeTest.java	18 Mar 2004 10:04:50 -0000	1.2
  +++ GBeanMBeanAttributeTest.java	8 Apr 2004 05:22:15 -0000	1.3
  @@ -19,8 +19,6 @@
   import javax.management.MalformedObjectNameException;
   import javax.management.ObjectName;
   
  -import junit.framework.TestCase;
  -
   import org.apache.geronimo.gbean.DynamicGAttributeInfo;
   import org.apache.geronimo.gbean.GAttributeInfo;
   import org.apache.geronimo.gbean.InvalidConfigurationException;
  @@ -28,6 +26,8 @@
   import org.apache.geronimo.kernel.MockDynamicGBean;
   import org.apache.geronimo.kernel.MockGBean;
   
  +import junit.framework.TestCase;
  +
   /**
    * @version $Revision$ $Date$
    */
  @@ -37,8 +37,6 @@
   
       private static final String persistentPrimitiveAttributeName = "MutableInt";
   
  -    private static final String attributeValue = "Value";
  -
       private static ObjectName name;
       static {
           try {
  @@ -227,7 +225,7 @@
               final GAttributeInfo attributeInfo = new GAttributeInfo("YetAnotherFinalInt",
true,
                       "getVoidGetterOfFinalInt", null);
               try {
  -                GBeanMBeanAttribute attribute = new GBeanMBeanAttribute(gmbean, attributeInfo,
null);
  +                new GBeanMBeanAttribute(gmbean, attributeInfo, null);
                   fail("Getter method not found on target; InvalidConfigurationException
expected");
               } catch (InvalidConfigurationException expected) {
               }
  @@ -237,7 +235,7 @@
               final GAttributeInfo attributeInfo = new GAttributeInfo("YetAnotherFinalInt",
true, null,
                       "setThatDoesntExist");
               try {
  -                GBeanMBeanAttribute attribute = new GBeanMBeanAttribute(gmbean, attributeInfo,
null);
  +                new GBeanMBeanAttribute(gmbean, attributeInfo, null);
                   fail("Setter method not found on target; InvalidConfigurationException
expected");
               } catch (InvalidConfigurationException expected) {
               }
  @@ -366,6 +364,7 @@
                   attribute2.online();
                   fail("AssertionError or NullPointerException expected");
               } catch (Exception expected) {
  +            } catch (AssertionError expected) {
               }
           }
       }
  
  
  
  1.2       +4 -2      incubator-geronimo/modules/naming/src/java/org/apache/geronimo/naming/deployment/LocalRefDConfigBean.java
  
  Index: LocalRefDConfigBean.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/naming/src/java/org/apache/geronimo/naming/deployment/LocalRefDConfigBean.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- LocalRefDConfigBean.java	9 Mar 2004 18:03:11 -0000	1.1
  +++ LocalRefDConfigBean.java	8 Apr 2004 05:22:15 -0000	1.2
  @@ -34,7 +34,9 @@
       public LocalRefDConfigBean(DDBean ddBean, RefAdapter ref, String namePath) {
           super(ddBean, ref.getXmlObject());
           this.ref = ref;
  -        assert ddBean.getChildBean(namePath)[0].equals(getRefName());
  +
  +        // this doesn't work
  +//        assert ddBean.getChildBean(namePath)[0].equals(getRefName());
       }
   
       String getRefName() {
  
  
  
  1.4       +2 -2      incubator-geronimo/modules/network/src/java/org/apache/geronimo/network/protocol/control/ControlClientProtocol.java
  
  Index: ControlClientProtocol.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/network/src/java/org/apache/geronimo/network/protocol/control/ControlClientProtocol.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ControlClientProtocol.java	17 Mar 2004 03:11:59 -0000	1.3
  +++ ControlClientProtocol.java	8 Apr 2004 05:22:15 -0000	1.4
  @@ -131,7 +131,7 @@
   
       public void sendDown(DownPacket packet) throws ProtocolException {
           try {
  -            if (!sendMutex.attempt(timeout)) throw new ProtocolException("Send timeout.");
  +            if (!sendMutex.attempt(timeout)) throw new ProtocolException("Send timeout");
               PassthroughDownPacket passthtough = new PassthroughDownPacket();
               passthtough.setBuffers(packet.getBuffers());
   
  
  
  
  1.7       +3 -3      incubator-geronimo/modules/network/src/test/org/apache/geronimo/network/protocol/control/ControlProtocolTest.java
  
  Index: ControlProtocolTest.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/network/src/test/org/apache/geronimo/network/protocol/control/ControlProtocolTest.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ControlProtocolTest.java	3 Apr 2004 22:57:42 -0000	1.6
  +++ ControlProtocolTest.java	8 Apr 2004 05:22:15 -0000	1.7
  @@ -119,7 +119,7 @@
           clientStack.setSelectorManager(sm);
   
           SocketProtocol sp = new SocketProtocol();
  -        sp.setTimeout(10 * 1000);
  +        sp.setTimeout(15 * 1000);
           sp.setInterface(new InetSocketAddress(ssa.getConnectURI().getHost(), 0));
           sp.setAddress(new InetSocketAddress(ssa.getConnectURI().getHost(), ssa.getConnectURI().getPort()));
           sp.setSelectorManager(sm);
  @@ -127,7 +127,7 @@
           clientStack.push(sp);
   
           ControlClientProtocol ccp = new ControlClientProtocol();
  -        ccp.setTimeout(10 * 1000);
  +        ccp.setTimeout(15 * 1000);
   
           clientStack.push(ccp);
   
  
  
  
  1.4       +2 -2      incubator-geronimo/modules/transaction/src/java/org/apache/geronimo/transaction/UserTransactionImpl.java
  
  Index: UserTransactionImpl.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/transaction/src/java/org/apache/geronimo/transaction/UserTransactionImpl.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- UserTransactionImpl.java	7 Apr 2004 23:38:18 -0000	1.3
  +++ UserTransactionImpl.java	8 Apr 2004 05:22:15 -0000	1.4
  @@ -67,7 +67,7 @@
       public void setOnline(boolean online) {
           //too bad there's no implies operation
           // online implies transactionManager != null
  -        assert !online & txnManager != null : "online requires a tx manager";
  +        assert !online || txnManager != null : "online requires a tx manager";
           state.set(online ? ONLINE : OFFLINE);
       }
   
  
  
  

Mime
View raw message