Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [stellation-res] SvcConnectTest: assertion of 'true' and 'true\n'!

On Wed, Jul 31, 2002 at 09:58:50PM +0100, Ringo De Smet wrote:
> Hello Florin,
> 
> I have been able to launch your SvcConnectTest in combination with my
> Oracle backend, but I think I found a little mistake. First of all,
> does this test pass in your setup?

Yes, it does. I just did a fresh checkout from the CVS repository,
rebuilt svc.jar and ran ant in org.eclipse.stellation.unittest.
All three tests pass sucessfully.

> In the class org.eclipse.stellation.workspace.Test, I see the following
> code:
> 
> if (options().get("verbose","").equals("true")) {
>      System.out.println(answer ? "true" : "false");
> }
> 
> This writes not only the word 'true', but also a newline character.
> Later on in IORedirector, you read all the lines outputted by SVC and
> compare that to the expected results. In there, an assertEquals happens
> with the actual 'true\n' and the expected 'true'. With the newline in
> the actual message, this test fails on me, while SVC has actually been
> able to connect. I think you either have to strip the newline character
> from the actual message, or add it to the expected message.

The StringTokenizer created at line 61 eats that newline. That
StringTokenizer breaks the program output in lines.

Please get the files from the CVS and check with those.

> BTW, tnx for your work on the unit tests. They are very valuable when
> developping the Oracle backend.

Thank you for your kind words,
florin

-- 

"If it's not broken, let's fix it till it is."

41A9 2BDE 8E11 F1C5 87A6  03EE 34B3 E075 3B90 DFE4

Attachment: pgpY_CTA4wZ9I.pgp
Description: PGP signature


Back to the top