Subject Re: Junit - Create Database
Author verbguy
I was able to answer my own question. I see that the test database is
created by the common/FBTestBase.java file, and that all of the other
test cases extend this. That's OK.

Another question - when I try to run a single test case, as in

C:\workspace\client-java>build one-test-embedded -Dtest=Reconnect

Evidently the logging isn't being setup correctly, althought the test
does run. Is this a bug in the build script? See output below:

It could be that I'm not invoking the command correctly. The test.xml
file says to specify the test property as :

-Dtest=Gds one-test

but adding spaces to the property doesn't help me.

Thanks, any help would be greatly appreciated -

-bill

one-test-embedded:
[junit] dir attribute ignored if running in the same VM
[junit] log4j:ERROR setFile(null,true) call failed.
[junit] java.io.FileNotFoundException: log\test.log (The system
cannot find
the path specified)
[junit] at java.io.FileOutputStream.openAppend(Native Method)
[junit] at java.io.FileOutputStream.<init>
(FileOutputStream.java:174)
[junit] at java.io.FileOutputStream.<init>
(FileOutputStream.java:102)
[junit] at java.io.FileWriter.<init>(FileWriter.java:61)
[junit] at org.apache.log4j.FileAppender.setFile
(FileAppender.java:316)
[junit] at org.apache.log4j.FileAppender.activateOptions
(FileAppender.ja
va:182)
[junit] at
org.apache.log4j.PropertyConfigurator.configureOptionHandler(
PropertyConfigurator.java:451)
[junit] at org.apache.log4j.PropertyConfigurator.parseAppender
(PropertyC
onfigurator.java:585)
[junit] at org.apache.log4j.PropertyConfigurator.parseCategory
(PropertyC
onfigurator.java:555)
[junit] at
org.apache.log4j.PropertyConfigurator.configureRootCategory(P
ropertyConfigurator.java:462)
[junit] at org.apache.log4j.PropertyConfigurator.doConfigure
(PropertyCon
figurator.java:388)
[junit] at org.apache.log4j.PropertyConfigurator.doConfigure
(PropertyCon
figurator.java:414)
[junit] at
org.apache.log4j.helpers.OptionConverter.selectAndConfigure(O
ptionConverter.java:345)
[junit] at org.apache.log4j.Category.<clinit>
(Category.java:160)
[junit] at java.lang.Class.forName0(Native Method)
[junit] at java.lang.Class.forName(Class.java:140)
[junit] at org.firebirdsql.logging.LoggerFactory.getLogger
(LoggerFactory
.java:52)
[junit] at org.firebirdsql.logging.LoggerFactory.getLogger
(LoggerFactory





--- In Firebird-Java@yahoogroups.com, "verbguy" <bill.oliver@a...>
wrote:
> Hi,
>
> I'm trying to run the Junit embedded tests - and only those, as I'm
> testing vulcan embedded. So, I can run
>
> build all-tests-embedded
>
> And I'm able to run the tests. A lot of the tests fail because the
> fbtest.gdb database isn't where it should be - C:\workspace\client-
> java\output\db - on my machine.
>
> So, do I just need to create this database myself, or is it created
> by one of the other test cases? I've grepped the files, but I just
> don't see where it should be created.
>
> Thanks!
>
> -bill