

Public Member Functions | |
| TestComponents (Logger logger, String managerLoc, String clientName) throws Exception | |
| void | clientLoggedIn (ClientInfo clientInfo) |
| void | clientLoggedOut (int clientHandle) |
| void | componentLoggedIn (ComponentInfo compInfo) |
| void | componentLoggedOut (int comphandle) |
| void | componentReleased (ComponentInfo compInfo) |
| void | containerLoggedIn (ContainerInfo contInfo) |
| void | containerLoggedOut (int conthandle) |
| void | test () |
Static Public Member Functions | |
| static void | main (String[] args) |
Private Member Functions | |
| boolean | waitContainers () |
| boolean | waitComponents () |
| void | getComponents () throws Exception |
| void | releaseComponents () |
Private Attributes | |
| AdministratorClient | administratorClient |
| boolean | pyContainerLogged = false |
| boolean | cppContainerLogged = false |
| boolean | javaContainerLogged = false |
| int | pyContHandle |
| int | cppContHandle |
| int | javaContHandle |
| boolean | pyComponentLogged = false |
| boolean | cppComponentLogged = false |
| boolean | javaComponentLogged = false |
| int | pyCompHandle |
| int | cppCompHandle |
| int | javaCompHandle |
| HelloWorld | pyHW = null |
| HelloWorld | cppHW = null |
| HelloWorld | javaHW = null |
A class to test components references.
It gets the java, python and C++ components and call their CORBA method after the containers have been restarted.
The checks is done twice. The first one shutting down the container in a normal way and the second one by killing the containers.
| alma::test::corbareftest::TestComponents::TestComponents | ( | Logger | logger, | |
| String | managerLoc, | |||
| String | clientName | |||
| ) | throws Exception [inline] |
Constructor
| logger | The logger | |
| managerLoc | The manager reference |
References alma::test::corbareftest::AdministratorClient::addLogListener(), administratorClient, alma::test::corbareftest::AdministratorClient::connectToManager(), and alma::acs::component::client::AdvancedComponentClient::getAcsCorba().
Referenced by main().
| void alma::test::corbareftest::TestComponents::clientLoggedIn | ( | ClientInfo | clientInfo | ) | [inline] |
Called if a client logged in
| contInfo | The container |
Implements alma::test::corbareftest::AdministratorListener.
References si::ijs::maci::ClientInfo::h, and si::ijs::maci::ClientInfo::name.
| void alma::test::corbareftest::TestComponents::clientLoggedOut | ( | int | clientHandle | ) | [inline] |
Called if a client logged in
| clientHandle | The handle of the client |
Implements alma::test::corbareftest::AdministratorListener.
| void alma::test::corbareftest::TestComponents::componentLoggedIn | ( | ComponentInfo | compInfo | ) | [inline] |
Called if a component logged in or when a client requested a component
| contInfo | The component |
Implements alma::test::corbareftest::AdministratorListener.
References cppComponentLogged, si::ijs::maci::ComponentInfo::h, javaComponentLogged, si::ijs::maci::ComponentInfo::name, and pyComponentLogged.
| void alma::test::corbareftest::TestComponents::componentLoggedOut | ( | int | comphandle | ) | [inline] |
Called if component logged out
| comphandle | The handle of the component |
Implements alma::test::corbareftest::AdministratorListener.
References cppCompHandle, cppComponentLogged, javaCompHandle, javaComponentLogged, pyCompHandle, and pyComponentLogged.
| void alma::test::corbareftest::TestComponents::componentReleased | ( | ComponentInfo | compInfo | ) | [inline] |
Called when a client released a component. If this method is called it means that the component is still alive (used by some client)
| compInfo | The released component |
Implements alma::test::corbareftest::AdministratorListener.
References si::ijs::maci::ComponentInfo::name.
| void alma::test::corbareftest::TestComponents::containerLoggedIn | ( | ContainerInfo | contInfo | ) | [inline] |
Called if container logged in
| contInfo | The container |
Implements alma::test::corbareftest::AdministratorListener.
References cppContainerLogged, cppContHandle, si::ijs::maci::ContainerInfo::h, javaContainerLogged, javaContHandle, si::ijs::maci::ContainerInfo::name, pyContainerLogged, and pyContHandle.
| void alma::test::corbareftest::TestComponents::containerLoggedOut | ( | int | conthandle | ) | [inline] |
Called if container logged out
| contHandle | The handle of the container Ha chiama |
Implements alma::test::corbareftest::AdministratorListener.
References cppComponentLogged, cppContainerLogged, cppContHandle, javaComponentLogged, javaContainerLogged, javaContHandle, pyComponentLogged, pyContainerLogged, and pyContHandle.
| void alma::test::corbareftest::TestComponents::getComponents | ( | ) | throws Exception [inline, private] |
| static void alma::test::corbareftest::TestComponents::main | ( | String[] | args | ) | [inline, static] |
References test(), and TestComponents().
| void alma::test::corbareftest::TestComponents::releaseComponents | ( | ) | [inline, private] |
| void alma::test::corbareftest::TestComponents::test | ( | ) | [inline] |
Test if the references are valid.
It works in this way: 1. get the components (python, java and C++ versions) 2. execute the displayMessage() in each component 3. wait until all the containers are back online 4. wait until all the components are back online 5 execute the displayMessage() in each component 6. wait until all the containers are back online 7. wait until all the components are back online 8 execute the displayMessage() in each component
At the beginning the containers are online, activated by tat as defined in the prologue. A separate process shuts down the containers and restarted them by using acs commands. Lines 1-5 check if the references are valid with normal restarting of containers.
After that, the external process kills the containers (abnormal termination) and after a while restarts them Lines 6-8 check if the references are valid also in this second case.
References cppComponentLogged, cppContainerLogged, cppHW, getComponents(), javaComponentLogged, javaContainerLogged, javaHW, pyComponentLogged, pyContainerLogged, pyHW, releaseComponents(), waitComponents(), and waitContainers().
Referenced by main().
| boolean alma::test::corbareftest::TestComponents::waitComponents | ( | ) | [inline, private] |
Wait until all the components are back online
true if the components are online false in case of a timeout References cppComponentLogged, javaComponentLogged, and pyComponentLogged.
Referenced by test().
| boolean alma::test::corbareftest::TestComponents::waitContainers | ( | ) | [inline, private] |
Wait until all the containers are back online
true if the containers are online false in case of a timeout References cppContainerLogged, javaContainerLogged, and pyContainerLogged.
Referenced by test().
Referenced by TestComponents().
int alma::test::corbareftest::TestComponents::cppCompHandle [private] |
Referenced by componentLoggedOut().
boolean alma::test::corbareftest::TestComponents::cppComponentLogged = false [private] |
Referenced by componentLoggedIn(), componentLoggedOut(), containerLoggedOut(), test(), and waitComponents().
boolean alma::test::corbareftest::TestComponents::cppContainerLogged = false [private] |
Referenced by containerLoggedIn(), containerLoggedOut(), test(), and waitContainers().
int alma::test::corbareftest::TestComponents::cppContHandle [private] |
Referenced by containerLoggedIn(), and containerLoggedOut().
HelloWorld alma::test::corbareftest::TestComponents::cppHW = null [private] |
Referenced by getComponents(), releaseComponents(), and test().
int alma::test::corbareftest::TestComponents::javaCompHandle [private] |
Referenced by componentLoggedOut().
boolean alma::test::corbareftest::TestComponents::javaComponentLogged = false [private] |
Referenced by componentLoggedIn(), componentLoggedOut(), containerLoggedOut(), test(), and waitComponents().
boolean alma::test::corbareftest::TestComponents::javaContainerLogged = false [private] |
Referenced by containerLoggedIn(), containerLoggedOut(), test(), and waitContainers().
int alma::test::corbareftest::TestComponents::javaContHandle [private] |
Referenced by containerLoggedIn(), and containerLoggedOut().
HelloWorld alma::test::corbareftest::TestComponents::javaHW = null [private] |
Referenced by getComponents(), releaseComponents(), and test().
int alma::test::corbareftest::TestComponents::pyCompHandle [private] |
Referenced by componentLoggedOut().
boolean alma::test::corbareftest::TestComponents::pyComponentLogged = false [private] |
Referenced by componentLoggedIn(), componentLoggedOut(), containerLoggedOut(), test(), and waitComponents().
boolean alma::test::corbareftest::TestComponents::pyContainerLogged = false [private] |
Referenced by containerLoggedIn(), containerLoggedOut(), test(), and waitContainers().
int alma::test::corbareftest::TestComponents::pyContHandle [private] |
Referenced by containerLoggedIn(), and containerLoggedOut().
HelloWorld alma::test::corbareftest::TestComponents::pyHW = null [private] |
Referenced by getComponents(), releaseComponents(), and test().
1.6.2