I am growing suspicious, that the JUnit task in Ant is hosing things up. I have 
created a second sandbox and tested a variety of things (all using the same 
original Aspect I created).

This works:
      <java fork="yes" failOnError="true" 
className="jboss.aop.test.IntegrationEval">
  |          <sysproperty key="jboss.aop.class.path" 
value="../AspectsProj/bin"/>
  |          <sysproperty key="jboss.aop.verbose" value="false"/>
  |          <classpath refid="classpath50"/>
  |       </java>
  | 

This does not:
        <junit errorProperty="test.failed" failureProperty="test.failed" 
fork="true">
  |             <test name="jboss.aop.test.AdvisedTest" />
  |             <classpath>
  |                     <path refid="classpath50"/>
  |             </classpath>
  |             <jvmarg value="-Djboss.aop.class.path=../AspectsProj/bin" />
  |             <jvmarg value="-Djboss.aop.verbose=true" />
  |     </junit>
  | 

Looks practically identical. Both fork, both have the same jvm args, both have 
the same classpath.

Here's the class that is run by the  task:

  | package jboss.aop.test;
  | 
  | import advice.annotation.ResponseMeasurement;
  | 
  | public class IntegrationEval {
  | 
  |     /**
  |      * @param args
  |      */
  |     public static void main(String[] args) {
  |             sleep();
  |             Advised obj = new Advised();
  |             obj.advised();
  |     }
  | 
  |     @ResponseMeasurement
  |     public static void sleep() {
  |             try {
  |                     Thread.sleep(775);
  |             } catch (InterruptedException e) {
  |                     e.printStackTrace();
  |             }
  |     }
  | }
  | 

Here's the code run by the  task:

  | package jboss.aop.test;
  | 
  | import junit.framework.TestCase;
  | 
  | public class AdvisedTest extends TestCase {
  | 
  |     /*
  |      * Test method for 'jboss.aop.test.Advised.advised()'
  |      */
  |     public void testAdvised() {
  |             Advised obj = new Advised();
  |             obj.advised();
  |     }
  | 
  | }
  | 

And here's the Advice class both use:

  | package jboss.aop.test;
  | 
  | import advice.annotation.ResponseMeasurement;
  | 
  | public class Advised {
  |     
  |     public Advised() {
  |             // TODO Auto-generated constructor stub
  |     }
  |     
  |     @ResponseMeasurement
  |     public void advised() {
  |             try {
  |                     Thread.sleep(445);
  |             } catch (InterruptedException e) {
  |                     // TODO Auto-generated catch block
  |                     e.printStackTrace();
  |             }
  |     }
  | }
  | 

Hope this helps you help me!

Thanks,
Brice Ruth

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3965867#3965867

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3965867
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to