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

alma::lasersource::test::SendTest Class Reference

List of all members.

Public Member Functions

 SendTest () throws Exception
void setUp () throws Exception
void tearDown () throws Exception
void testSend () throws Exception
void testStress () throws Exception
void receive (com.cosylab.acs.jms.ACSJMSMessageEntity msg)

Private Member Functions

boolean isValidFSMessage (FaultStateImpl fs, int num)

Private Attributes

volatile Consumer m_consumer
final int ITERATIONS = 10
int nMsgReceived
volatile Object receiverError
String faultFamily = "AlarmSource"
String faultMember = "ALARM_SOURCE_ANTENNA"

Static Private Attributes

final String m_channelName = "CMW.ALARM_SYSTEM.ALARMS.SOURCES.ALARM_SYSTEM_SOURCES"

Detailed Description

A class to test the sources. It is composed of 2 tests: 1- send an alarm 2- stress test that sends several alarms

Each message is checked for integrity


Constructor & Destructor Documentation

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


Member Function Documentation

boolean alma::lasersource::test::SendTest::isValidFSMessage FaultStateImpl  fs,
int  num
[inline, private]
 

Check if the message is coherent with the number

Parameters:
fs The FS to check
num The number of the message
Returns:
true if the message is right

void alma::lasersource::test::SendTest::receive com.cosylab.acs.jms.ACSJMSMessageEntity  msg  )  [inline]
 

The method receives all the messages published in the NC For each message received it checks if its content is right i.e. the name of the class, the member and the code contains the number of the message in the sequence. In this way it also checks if the messages are received in the same order they were sent. The method also checks if all the messages have been received and prints a message if receives more messages then the messages pushed

Parameters:
msg The message received from the NC
See also:
alma.acs.nc.Consumer

void alma::lasersource::test::SendTest::setUp  )  throws Exception [inline]
 

void alma::lasersource::test::SendTest::tearDown  )  throws Exception [inline]
 

void alma::lasersource::test::SendTest::testSend  )  throws Exception [inline]
 

void alma::lasersource::test::SendTest::testStress  )  throws Exception [inline]
 


Member Data Documentation

String alma::lasersource::test::SendTest::faultFamily = "AlarmSource" [private]
 

String alma::lasersource::test::SendTest::faultMember = "ALARM_SOURCE_ANTENNA" [private]
 

final int alma::lasersource::test::SendTest::ITERATIONS = 10 [private]
 

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

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

int alma::lasersource::test::SendTest::nMsgReceived [private]
 

volatile Object alma::lasersource::test::SendTest::receiverError [private]
 

Alarm NC events are received in different threads than the tests run in. In order to let the test fail when there are receiver exceptions or validation errors, we can communicate them in this variable.


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