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< FaultStateReceived > | receivedFS |
Vector< MiniFaultState > | statesToPublish |
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 |
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.
|
Constructor
|
|
Build the data to publish and check for correctness
|
|
|
|
|
|
Send a fault state to the NC. It uses the global source or build a new one depending on the parameter
|
|
|
|
|
|
Test by sending all the fault states using the same source. When all the alarms have arrived it checks for their correctness
|
|
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.
|
|
Wait until all the fault states are received or a timeout happened.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|