[Design of JBoss jBPM] - The PostgreSQL Issue
by thomas.diesler@jboss.com
Folks,
I investigated this a little more. It seems that most of the time is spend in createSchema() per test.
| Running org.jbpm.graph.exe.ProcessInstanceDbTest
|
| super.setUp: 0ms
| createSchema: 3811ms
| createJbpmContext: 0ms
| initializeMembers: 0ms
| ProcessInstanceDbTest.testProcessInstanceProcessDefinition: 21ms
| resetMembers: 1ms
| closeJbpmContext: 0ms
|
|
| super.setUp: 0ms
| createSchema: 5162ms
| createJbpmContext: 0ms
| initializeMembers: 1ms
| ProcessInstanceDbTest.testProcessInstanceDates: 68ms
| resetMembers: 0ms
| closeJbpmContext: 1ms
|
|
| super.setUp: 0ms
| createSchema: 3397ms
| createJbpmContext: 1ms
| initializeMembers: 0ms
| ProcessInstanceDbTest.testProcessInstanceRootToken: 16ms
| resetMembers: 0ms
| closeJbpmContext: 1ms
|
|
| super.setUp: 0ms
| createSchema: 3420ms
| createJbpmContext: 0ms
| initializeMembers: 0ms
| ProcessInstanceDbTest.testProcessInstanceSuperProcessToken: 29ms
| resetMembers: 0ms
| closeJbpmContext: 1ms
|
|
| super.setUp: 0ms
| createSchema: 3346ms
| createJbpmContext: 0ms
| initializeMembers: 0ms
| ProcessInstanceDbTest.testProcessInstanceModuleInstances: 45ms
| resetMembers: 0ms
| closeJbpmContext: 1ms
|
|
| super.setUp: 0ms
| createSchema: 3342ms
| createJbpmContext: 1ms
| initializeMembers: 0ms
| ProcessInstanceDbTest.testProcessInstanceRuntimeActions: 15ms
| resetMembers: 0ms
| closeJbpmContext: 1ms
|
| Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 22.702 sec
|
The time is increasing as the test suite progresses.
It also seems that tearDown() is not always called
| Running org.jbpm.db.DeleteProcessInstanceDbTest
|
| super.setUp: 0ms
| createSchema: 789ms
| createJbpmContext: 0ms
|
| super.setUp: 0ms
| createSchema: 790ms
| createJbpmContext: 0ms
|
| super.setUp: 0ms
| createSchema: 755ms
| createJbpmContext: 0ms
|
| super.setUp: 0ms
| createSchema: 4666ms
| createJbpmContext: 1ms
| Tests run: 4, Failures: 0, Errors: 4, Skipped: 0, Time elapsed: 7.028 sec <<< FAILURE!
|
Another concern is that the number of postgresql processes is increasing unexpectedly
| [tdiesler@tdvaio java]$ ps ax | grep postgres
| 3177 ? Ss 0:00 postgres: logger process
| 3192 ? Ss 0:07 postgres: writer process
| 3193 ? Ss 0:00 postgres: wal writer process
| 3194 ? Ss 0:00 postgres: autovacuum launcher process
| 3195 ? Ss 0:04 postgres: stats collector process
| 7901 pts/2 Sl+ 0:10 /usr/java/jdk1.6/bin/java -Xmx256m -classpath /usr/java/maven/boot/classworlds-1.1.jar -Dclassworlds.conf=/usr/java/maven/bin/m2.conf -Dmaven.home=/usr/java/maven org.codehaus.classworlds.Launcher "-o" "-Ddatabase=postgresql" "test"
| 7964 ? Ss 0:01 postgres: jbpmtest jbpmtest 127.0.0.1(45926) idle in transaction
| 7973 ? Ss 0:01 postgres: jbpmtest jbpmtest 127.0.0.1(45928) idle in transaction
| 7977 ? Ss 0:01 postgres: jbpmtest jbpmtest 127.0.0.1(45930) idle in transaction
| ...
| 8599 ? Ss 0:00 postgres: jbpmtest jbpmtest 127.0.0.1(57772) idle in transaction
| 8607 ? Ss 0:00 postgres: jbpmtest jbpmtest 127.0.0.1(57774) idle in transaction
| 8611 ? Ss 0:00 postgres: jbpmtest jbpmtest 127.0.0.1(57777) idle in transaction
| [tdiesler@tdvaio java]$ ps ax | grep -c postgres
| 107
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4176311#4176311
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4176311