Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

alma::lasersource::test::SourceStressTest Class Reference

List of all members.

Public Member Functions

 SourceStressTest () throws Exception
void receive (ACSJMSMessageEntity msg) throws Exception
void testStressSameSource () throws Exception
void testStressDifferentSources () throws Exception

Protected Member Functions

void setUp () throws Exception
void tearDown () throws Exception

Private Member Functions

void send (MiniFaultState mfs, boolean sameSource) throws Exception
void checkFaultStates (MiniFaultState sent, FaultState recv) throws Exception
void buildData (int len) throws Exception
void waitForFSs () throws Exception

Private Attributes

volatile Consumer m_consumer
ACSAlarmSystemInterface alarmSource
Vector< FaultStateReceivedreceivedFS
Vector< MiniFaultStatestatesToPublish

Static Private Attributes

final int NUM_OF_FS_TO_SEND_ONE_SOURCE = 10000
final int NUM_OF_FS_TO_SEND_MORE_SOURCES = 1000
final String m_channelName = "CMW.ALARM_SYSTEM.ALARMS.SOURCES.ALARM_SYSTEM_SOURCES"
String FF = "Family"
String FM = "Member"
Random rnd = new Random(System.currentTimeMillis())
int count = 0

Detailed Description

A stress test: it sends a great number of alarm sources and checks

The FaultStates are sent in the same order their are published if the sending is done with one source per each FS. If the source is only one for all the alarms, then it applies a kind of caching and the FSs do not arrive in the same order the are published. In the latter case, the FSs published and the FSs received are both sorted by FM and compared.

Author:
acaproni


Constructor & Destructor Documentation

alma::lasersource::test::SourceStressTest::SourceStressTest  )  throws Exception [inline]
 

Constructor

Exceptions:
Exception 


Member Function Documentation

void alma::lasersource::test::SourceStressTest::buildData int  len  )  throws Exception [inline, private]
 

Build the data to publish and check for correctness

Parameters:
len The number of items to biuld and put in the array

void alma::lasersource::test::SourceStressTest::checkFaultStates MiniFaultState  sent,
FaultState  recv
throws Exception [inline, private]
 

void alma::lasersource::test::SourceStressTest::receive ACSJMSMessageEntity  msg  )  throws Exception [inline]
 

void alma::lasersource::test::SourceStressTest::send MiniFaultState  mfs,
boolean  sameSource
throws Exception [inline, private]
 

Send a fault state to the NC. It uses the global source or build a new one depending on the parameter

Parameters:
mfs The fault state to publish
sameSource If true the same source is used to send the alarm if true a new source is built and the fault state is sent using this new source

void alma::lasersource::test::SourceStressTest::setUp  )  throws Exception [inline, protected]
 

See also:
alma.acs.component.client.ComponentClientTestCase::tearDown()

void alma::lasersource::test::SourceStressTest::tearDown  )  throws Exception [inline, protected]
 

See also:
alma.acs.component.client.ComponentClientTestCase::tearDown()

void alma::lasersource::test::SourceStressTest::testStressDifferentSources  )  throws Exception [inline]
 

Test by sending all the fault states using the same source. When all the alarms have arrived it checks for their correctness

Exceptions:
Exception 

void alma::lasersource::test::SourceStressTest::testStressSameSource  )  throws Exception [inline]
 

Test by sending all the fault states using the same source. When all the alarms have arrived it checks for their correctness.

NOTE: when using only on source, not all the FS arrive in the same order they are submitted to the source. For this reason the collection are sorted before comparing.

Exceptions:
Exception 

void alma::lasersource::test::SourceStressTest::waitForFSs  )  throws Exception [inline, private]
 

Wait until all the fault states are received or a timeout happened.

Exceptions:
Exception in case of timeout


Member Data Documentation

ACSAlarmSystemInterface alma::lasersource::test::SourceStressTest::alarmSource [private]
 

int alma::lasersource::test::SourceStressTest::count = 0 [static, private]
 

String alma::lasersource::test::SourceStressTest::FF = "Family" [static, private]
 

String alma::lasersource::test::SourceStressTest::FM = "Member" [static, private]
 

final String alma::lasersource::test::SourceStressTest::m_channelName = "CMW.ALARM_SYSTEM.ALARMS.SOURCES.ALARM_SYSTEM_SOURCES" [static, private]
 

volatile Consumer alma::lasersource::test::SourceStressTest::m_consumer [private]
 

final int alma::lasersource::test::SourceStressTest::NUM_OF_FS_TO_SEND_MORE_SOURCES = 1000 [static, private]
 

final int alma::lasersource::test::SourceStressTest::NUM_OF_FS_TO_SEND_ONE_SOURCE = 10000 [static, private]
 

Vector<FaultStateReceived> alma::lasersource::test::SourceStressTest::receivedFS [private]
 

Random alma::lasersource::test::SourceStressTest::rnd = new Random(System.currentTimeMillis()) [static, private]
 

Vector<MiniFaultState> alma::lasersource::test::SourceStressTest::statesToPublish [private]
 


The documentation for this class was generated from the following file:
Generated on Thu Apr 30 03:05:18 2009 for ACS Java API by doxygen 1.3.8