Changeset 5011 for ndgCommon

23/02/09 09:28:51 (10 years ago)

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.

1 added
2 edited


  • ndgCommon/trunk/ndg/common/unittests/README.txt

    r4793 r5011  
     1ndgCommon testsuite - overview 
    14The test suite can be ran as a whole by running the '' class as 
    25a python app - otherwise, individual test classes can be ran as unittests. 
    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: 
     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: 
    814hostname user password 
     16ii) Additionally, the tests require a config file at: 
     18unittests/testdata/pg.config with the format: 
     20databaseName hostName userName password port 
     22- obviously, these will have to point to a running instance of postgres 
     24iii) The 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! 
     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: 
     35should be adjusted so that the DEFAULT server value points to this server. 
     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. 
     44NB, the errors usually encountered are like: 
     46error: (10048, 'Address already in use') 
     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... 
  • ndgCommon/trunk/ndg/common/xmldb/setup/eXist/ReadMe.txt

    r4947 r5011  
    3333set these options using the JAVA_OPTIONS environment variable. 
    35 iii) Memory configuration...   
     35iii) Memory configuration:  
     37This seems to be the cause of a lot of problems with eXist.  Some tips: 
     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: 
     42<db-connection cacheSize="512M" collectionCache="48M" database="native" 
     43        files="webapp/WEB-INF/data" pageSize="4096"> 
     45- NB cacheSize should be less than half the size of the JVM memory - and preferably 
     46a third of the size 
Note: See TracChangeset for help on using the changeset viewer.