james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Charles Benett <char...@benett1.demon.co.uk>
Subject Re: [PATCH] JDBC-backed UsersRepository implementation.
Date Mon, 11 Jun 2001 10:02:25 GMT
Darrell DeBoer wrote:
> 
> Hi,
> 
> > I've got your UsersJDBCRepository up and working with mysql. Cool!
> > I've committed AbstractUsersRepository, UsersJDBCRepository and
> > mysql.jar.
> 
> So quickly...!
Just lucky!

> 
> >
> > However ... aliasing and forwarding doesn't seem to work. :-(
> >
> 
> Hmmm... this was something I hadn't added to the tests yet, since it wasn't
> being used. When I added tests for this, 3 of the 4 database configurations
> passed (including MySQL with JDBC/ODBC) but MySQL with MM Jdbc driver failed.
> It seems like the Jdbc driver won't accept a PreparedStatement.setBoolean()
> call on a SMALLINT column (I use SMALLINT as a widely available boolean
> column type in SQL).
> 
> I've patched UsersJDBCRepository to use PreparedStatement.setInt() instead,
> and it seems to work OK. (Patch included). I'll submit the patch for the
> updated tests when/if they are added to cvs.
> 
> > I've added junit-3.2.jar (copied from jakarta-turbine) but I get a bunch
> > of compile errors. Hence haven't committed testing classes yet. What
> > exact version are you using?
> 
> Two reasons for failure:
> 1) I built this on the latest JUnit (v3.7) and somewhere along the line the
> method "assert(boolean)" was deprecated and replaced with
> "assertTrue(boolean)". We can either use the latest JUnit version, or replace
> "assertTrue" with "assert" in the source.

If you send me the latest jar directly, I'll add it to cvs.

> 
> 2) You need to add JUnit to the tools/lib directory, so ant can run the
> <junit> task. I guess ant then adds JUnit to the classpath for the <javac>
> target.

Don't know. I'll try it when you send the jar.

> 
> >(stdout-based) DefaultLogger.java
> > WRT testlets, long-term they may be better but short term we can use
> > anything.
> > No idea on ComponentManager q, off hand.
> 
> Unfortunately, having getLogger() calls in UsersJDBCRepository causes the
> tests to return a null pointer exception, since the component isn't properly
> composed/configured. Where should I look to work out how to properly
> initialise a Component for testing? eg I'd like to have a simple Logger
> implementation to use for testing.

Hmm. But you also had problems with testing UsersFileRepository. 
I guess we need to find a way of testing Avalon-Phoenix stuff with
composed etc. components.
Probably have to dig through avalon-dev archive and ask on that list.

Charles

---------------------------------------------------------------------
To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-dev-help@jakarta.apache.org


Mime
View raw message