This is an old revision of the document!
QC2-OPE-LOG
This test may be run by itself and different configurations files are loaded and the log output is checked. However, more efficiently follow steps 001-002 now and then perform the later steps (003+) when running the ALG001 and ALG004 tests, since the same tests are being carried out.
Step | Direction | Expected Result | Pass/Fail Criteria or Comment |
---|---|---|---|
001 | Locate the Qc2 log file in $KVALOBS/var/log and remove all entries: | – | – |
rm Qc2.log Qc2.log.? | – | – | |
– | – | ||
002 | start kvQc2 (either standalone or with $KVALOBS/bin/kvQc2 e.g. see QC2-OPE-CFG) | – | – |
ls $KVALOBS/var/log | The Qc2.log file has been created (e.g. see below) | – |
kvalobs@pak:~/var/log$ ls postgresql Qc2.log kvalobs@pak:~/var/log$ cat Qc2.log 20100325233426: INFO --------------- Qc2Work: starting work thread! 20100325233426: INFO --------------- New database connection (PostgreSQL) created! 20100325233426: DEBUG --------------- Created a new connection to the database! 20100325233426: INFO --------------- %%%%%%%%%%%%%%%%%%%%%%%%
003 | Monitor the contents of the logfile, e.g. with “tail -f Qc2.log” while the next steps are carried out. | – | – |
Hint: the logfiles rotate and tail -f will stall when a rotation occurs. Just cancel and restart the command. | – | – | |
004 | Unpack the following config files to the Qc2Config directory: | – | – |
alg001-qcd2027.cfg.gz | – | – | |
alg004.cfg.gz | – | – | |
The test database must contain corresponding data, e.g. see ALG001 and ALG004 | – | – | |
It is assumed that kvQc2 is still up and running! | |||
003 | In algoo1-qcd20027.cfg set RunAtHour and RunAtMinute to be a few minutes in the future (NB the clock time is UTC). Monitor the log file. | Typical output such as ALG001-LogFile-Output is observed. | – |
003 | In ALG004.cfg set RunAtHour and RunAtMinute to be a few minutes in the future (NB the clock time is UTC). Monitor the log file. | Typical output such as ALG004-LogFile-Output is observed. | – |
ALG001-LogFile-Output
20100325234714: INFO --------------- Case 1: Redistribute 20100325234714: INFO --------------- Redistribute Accumulations 20100325234751: INFO --------------- Redistribute Precipitation Writing Data -1 45350 2027-6-3 6:0:0 20100325234751: INFO --------------- Redistribute Precipitation Writing Data -1 45350 2027-6-5 6:0:0 20100325234751: ERROR --------------- Can't contact CORBA nameservice. Is the CORBA nameservice running. --------------- (EXCEPTION: Can't obtain a reference for 'kvServiceDataReady' --------------- from the CORBA nameserver!) 20100325234808: INFO --------------- Redistribute Precipitation Writing Data 0.9 41370 2027-6-8 6:0:0 20100325234808: ERROR --------------- Can't contact CORBA nameservice. Is the CORBA nameservice running. --------------- (EXCEPTION: Can't obtain a reference for 'kvServiceDataReady' --------------- from the CORBA nameserver!)
NB The CORBA error above is a result of running this test on a development machine with no CORBA running. The algorithm results are written to the database but the KvServiced is not informed due to no CORBA nameservice. The kvalobs Qc1 code that manages this handles the exception gracefully.
ALG004-LogFile-Output