Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-dev] Getting wired behavior from junit while running a Weka test suite with ajc

Hello,

I conducted a set of experiments on the Weka source code. I intercepted all method calls in Weka at runtime with aspectj to investigate its behavior with different interception mechanisms (I gathered information about caller and callee objects). I used one of the test suites (weka.core) already existed in Weka packages to feed my execution. I ran that test suite using "ant build" and changed Junit compiler from "javac" to "ajc". The total number 251 Junit tests took about 45 minutes to finish with ajc compiler, while that similar test suite took just a minute to execute and compile with "javac" compiler (again ant used for execution). The excerpt of Junit execution on the intercepted version of Weka follows:

 [junit] Utils.java:551
 [junit] Utils.java:567
 [junit] Utils.java:588
 [junit] Utils.java:605
 [junit] Utils.java:605
 [junit] Utils.java:551
 [junit] Utils.java:567
 [junit] Utils.java:551
 [junit] Utils.java:567
 [junit] Utils.java:588
 [junit] Utils.java:605
 [junit] Utils.java:605
 [junit] Utils.java:605
 [junit] Utils.java:605
 [junit] Utils.java:605
 [junit] Utils.java:605
 [junit] Utils.java:605
 [junit] Utils.java:605
 [junit] .....
 [junit] Time: 2,625.089
 [junit]
 [junit] OK (251 tests)
 [junit]

BUILD SUCCESSFUL
Total time: 44 minutes 30 seconds

I am almost sure something goes wrong with this test suite execution and should not take this long. Junit keeps printing some Weka class names (such as: Utils.java, Attribute.java, SerializationHelper.java, BallNode.java ) with different line numbers. This Junit output is totally different with the one executed with "javac".

I don't know:

1. What does this behavior mean in Junit?

2. Was the the test suite correctly passed?

3. Whether the problem is from junit or my aspect? 

I executed the intercepted Weka successfully with a simpler set of execution from the command line before, but this problem appears when I use Junit.

Any insight is very much appreciated.


Thanks,

Hossien


Back to the top