Changeset 5011 for ndgCommon


Ignore:
Timestamp:
23/02/09 09:28:51 (10 years ago)
Author:
cbyrom
Message:

Add main README.txt documentation to codebase giving an overview of
the complete codebase along with descriptions of the structure and
info on important details. Also extend the setting up eXist and the test documentation.

Location:
ndgCommon/trunk
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • ndgCommon/trunk/ndg/common/unittests/README.txt

    r4793 r5011  
     1ndgCommon testsuite - overview 
     2-------------------------------- 
     3 
    14The test suite can be ran as a whole by running the 'noseTests.py' class as 
    25a python app - otherwise, individual test classes can be ran as unittests. 
    36 
    4 NB, some of the tests require a DB config file, 'exist.config' to 
    5 be available - in the ndgutilstests/testdata directory.  This should provide access 
     7Setting up test environment: 
     8---------------------------- 
     9 
     10i) Some tests require an eXist DB config file, 'exist.config' to 
     11be available - in the unittests/testdata directory.  This should provide access 
    612details to the required eXist database in the following format: 
    713 
    814hostname user password 
    915 
     16ii) Additionally, the testpostgresclient.py tests require a config file at: 
     17 
     18unittests/testdata/pg.config with the format: 
     19 
     20databaseName hostName userName password port 
     21 
     22- obviously, these will have to point to a running instance of postgres 
     23 
     24iii) The testconstants.py class defines constants to use for running the tests. 
     25These don't need changing, typically, however, the EXIST_DB variable defines 
     26which eXist host to use when running tests.  Whilst the tests do clean up after  
     27themselves, it's probably best not to run tests using a production environment DB! 
     28 
     29iv) Additionally, some tests expect a browse/discovery stack to be running and 
     30available for use.  Typically this just means deploying a MILK server and running 
     31this.  The file at: 
     32 
     33unittests/testdata/ndgDiscovery.config 
     34 
     35should be adjusted so that the DEFAULT server value points to this server. 
     36 
     37Errors 
     38----------- 
     39noseTests is not always very reliable and quite often produces errors from tests 
     40which run ok by themselves.  If, after a run has completed, errors are output, it 
     41is worth rerunning the test classes in question again - directly as python unit 
     42tests.  This will normally fix problems. 
     43 
     44NB, the errors usually encountered are like: 
     45 
     46error: (10048, 'Address already in use') 
     47 
     48- these suggest that some tests are being ran concurrently, although it's difficult 
     49to see exactly what is going on.  There are some tests that involve invoking 
     50asynchronous code and these may interfere, although these include sleep periods 
     51so this shouldn't be a problem... 
     52 
     53 
     54 
  • ndgCommon/trunk/ndg/common/xmldb/setup/eXist/ReadMe.txt

    r4947 r5011  
    3333set these options using the JAVA_OPTIONS environment variable. 
    3434 
    35 iii) Memory configuration...   
     35iii) Memory configuration:  
     36 
     37This seems to be the cause of a lot of problems with eXist.  Some tips: 
     38 
     39a) The JVM running eXist should be started with a reasonably large max memory size (using -Xmx= option) 1Gb+ 
     40b) Adjust the default settings in conf.xml - to something like: 
     41 
     42<db-connection cacheSize="512M" collectionCache="48M" database="native" 
     43        files="webapp/WEB-INF/data" pageSize="4096"> 
     44         
     45- NB cacheSize should be less than half the size of the JVM memory - and preferably 
     46a third of the size 
     47         
Note: See TracChangeset for help on using the changeset viewer.