-
1. Re: Server-side Testsuite Logging
clebert.suconic Apr 30, 2007 8:17 PM (in response to rachmato)On JBossMessaging we have a super class where we use setUp and tearDown to synchronize server and client logs.
http://anonsvn.jboss.org/repos/messaging/trunk/tests/src/org/jboss/test/messaging/MessagingTestCase.java
It is true though we aways call super.tearDown and super.setUp in all sub classes. Maybe it's possible to do the same thing with some double check on sub-classes.
Example:
http://anonsvn.jboss.org/repos/messaging/trunk/tests/src/org/jboss/test/messaging/jms/BrowserTest.java
I don't know how this would behave with deployment setups from JBossTestCase, but it is a good idea to at least have the className on server side logs. -
2. Re: Server-side Testsuite Logging
clebert.suconic Apr 30, 2007 8:28 PM (in response to rachmato)but given that it would only be used with the testsuite, this may not lead to a great saving
In my personal opinion this would be a nice thing to have, if this can be done without breaking other stuff. -
3. Re: Server-side Testsuite Logging
ryan.campbell Apr 30, 2007 9:30 PM (in response to rachmato)This sounds like a nice solution. Understanding testsuite server logs has always been difficult b ecause there was no correlation.
This should definitely be on by default for every test suite run. I see no reason why you wouldn't want this information. -
4. Re: Server-side Testsuite Logging
clebert.suconic May 1, 2007 11:19 AM (in response to rachmato)I guess this is the kind of thing that when we think about it we wonder why nobody has done it before :-)
-
5. Re: Server-side Testsuite Logging
ryan.campbell May 1, 2007 11:32 AM (in response to rachmato)Ok enough hugs & kisses. Let's see some code!
-
6. Re: Server-side Testsuite Logging
adrian.brock May 1, 2007 11:32 AM (in response to rachmato)A long time ago, I wrote an aspect that lets you pull down the logging
done on your server side thread and dump it in the client log:
http://anonsvn.jboss.org/repos/jbossas/trunk/aspects/src/main/org/jboss/aspects/logging
Its basically just a log4j plugin. ThreadLocalAppender
Of course this assumes you are using AOP Remoting to make the request
so it piggy back the log records in the InvocationResponse. -
7. Re: Server-side Testsuite Logging
ryan.campbell May 1, 2007 11:54 AM (in response to rachmato)Richard, this should probably be implemented using setUp() and tearDown() which, as per the contract, will be called for each test* method.
-
8. Re: Server-side Testsuite Logging
dimitris May 3, 2007 7:18 AM (in response to rachmato)FYI, for reading the free memory on the server there is the jboss.system:type=ServerInfo mbean.
For the total heap space, it has the following attributes:
FreeMemory (total - used)
TotalMemory (i.e. currently committed memory)
MaxMemory (maximum)
But there is also the listMemoryPools(true/false) operation to give you the same information displayed by JConsole.
http://wiki.jboss.org/wiki/Wiki.jsp?page=HowCanIDisplayTheMemoryPoolUsage