Re: Q: running the tests / debugging / logging

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Tue Nov 19 2002 - 18:24:03 EST

  • Next message: Andrus: "Re: Q: running the tests / debugging / logging"

    Holger,

    only 3 databases are proven to work with Cayenne (and with unit tests):
    Oracle (8, 8i, 9i), Sybase and MySQL. On others I am 99% sure you will run
    with the problems with tests, since all the DDL operations are extremely
    engine specific.

    Holger Hoffstätte writes:
    >
    > Today I tried to fix the remaining DbLoaderTst assertion failure (see bug
    > about isPrimaryKey) but in trying to do so quickly tumbled down the rabbit
    > hole..
    >
    > - was the assertion failure in DbLoaderTst always there? There seem to be
    > several things wrong with DbLoader, not only the isPrimaryKey problem but
    > also other asserts seem to break 'sometimes'. I will definitely spend some
    > time on this tomorrow.

    Works fine for me on all 3 databases above. I will doublecheck the new
    version at home tonight.

    >
    > - what kind of DB setup do you guys use? PostgreSQL? mySQL? How long do
    > your test runs take on average? I have Oracle working but OHMYGOD is this
    > slow and RAM hungry - I can completely forget this on my work laptop
    > ('only' 320 MB), and even on my new 2.4 GHz/512MB machine running eclipse,
    > Oracle 9i and the unit tests via ant on the command line completely bogs
    > down the whole machine. :(

    1. Oracle 9i running on Linux. The server is a bit slow, it takes about 120
    seconds to run all the tests (from the same machine or from another
    machine). I attribute it to the small amount of RAM (256 M) and slow
    metadata operations.

    2. Sybase 11.2 on Linux (the same box as Oracle). Tests take 30 seconds

    3. MySQL on Windows. Tests take 15 seconds.

    >
    > - I saw that initial PostgreSQL support is there for the plugin, but it's
    > empty. Will this work for the tests or is this still under construction?
    > Would be sweet to get this to work because I have pgsql here and would
    > much prefer it to mySQL if possible.

    PostgreSQL support is on the immediate TODO list and it WILL NOT work now.

     

    > - especially for running the tests hsqldb (http://hsqldb.sourceforge.net/)
    > might be worthwhile since it can keep tables in memory only (or on disk,
    > of course) and is therefore _extremely_ fast. According to a colleague it
    > 'just works', can be embedded (single JAR) and is very easy to set up.
    > Might also be a good idea for reviewing the performance tests because
    > usually network latency and general RDBMS I/O randomness probably shadows
    > much of cayenne's behaviour.
    >

    I would very much like to see how hsqldb (and other popular engines work
    with Cayenne), and write an adapter if necessary. Unfortunately this is all
    a timing issue, as well as familiarity with a particular engine. I would
    help as much as I can if someone starts an effort for an XYZ db. There were
    a few people offering support with Postgres but it never materialized :-(

    > - how can I control log4j output when running the tests? Maybe I
    > overlooked something but I couldn't find any way to specify this anywhere?
    > Makes debugging really hard..

    Cayenne logging is awaiting its own chapter in the user guide :-). Here is a
    pointer for now (it worked well with pre-ant unit tests, I don't know how it
    works at all with JUnit Ant task though....). There is a special file
    $HOME/.cayenne/cayenne-log.properties which is a regular log4j config file
    that is loaded by Configuration class. When I get home, I will send a sample
    that I have. Most Cayenne logging is done via "accesss.QueryLogger", so this
    is an important class to control.

    Andrus



    This archive was generated by hypermail 2.0.0 : Tue Nov 19 2002 - 18:24:12 EST