| de.nava.informa.utils.InformaTestCase de.nava.informa.impl.hibernate.TestHibernateStressTest
TestHibernateStressTest | final public class TestHibernateStressTest extends InformaTestCase (Code) | | Stress test of Informa's hibernate backend.
author: Pito Salas |
Inner Class :class ChannelLogEntry | |
Inner Class :public class ItemLogEntry | |
Inner Class :class ItemDeleter extends Thread | |
activeSemaphore | boolean activeSemaphore(Code) | | |
TestHibernateStressTest | public TestHibernateStressTest(String testname)(Code) | | Constructor of this test case
Parameters: testname - |
chanLogUpdate | void chanLogUpdate(ChannelIF channel, boolean recordMode)(Code) | | Called when Informa retrieves a Channel. We use it in two modes: when channels are first
retrieved from RSS over the network (recordmode = true), and then again when channels are
retrieved when the persistent hibernate database is opened, from disk (verify mode --
recordmode = false).
There are two counters in the ChannelLogEntry, one that counts how often the particular Channel
was seen during record mode, and the other during verify mode. Depending on the circumstance we
can detect failure conditions.
if recordCounter == 0 and verifyCounter != 0, we got a channel from disk which we didn't see
from the net if recordCounter > 0 and verifyCounter == 0, we got a channel from the net, which
we then didn't see from disk
Parameters: channel - - Relevant Channel. Parameters: recordMode - - are we recording (true) or verifying (false) |
getActiveSemaphor | synchronized boolean getActiveSemaphor()(Code) | | Return current value of activeSemaphor. True means background RSS poller in Informa is
happening False means it is not
current value of activeSemaphor |
itemLogUpdate | void itemLogUpdate(Item item, boolean recordMode)(Code) | | Called when Informa retrieves an Item.
Parameters: item - - Item to be recorded in log Parameters: recordMode - - are we recording (true) or verifying (false) |
openScaleDatabase | void openScaleDatabase(boolean virgin) throws Exception(Code) | | Open (or re-open) the database. Optionally begin from a blank database (virgin)
Parameters: virgin - true means start from a fresh database throws: Exception - |
testgetNVerify | public void testgetNVerify() throws Exception(Code) | | Basic Stress test. Simply Run a bunch of PersistentChannelGroups in parallel for a while and
then verify that the disk info matches what we found the first time through.
throws: Exception - |
|
|