[sip-comm-dev] build.xml accounts.properties test


#1

Hi, Emil..

Although we haven't seen it lately, there's a long history of new users tripping over because they haven't used the template to build a local version of this file. I'll be working on the testing.properties issues this weekend, but I wanted to check your view on this similar but unrelated matter...

At the moment, the build loads the contents of the local file with the simple statement:

<property file="${lib}/accounts.properties"/>

1. I believe this file is ONLY used by the test target(s), not by any of the run targets.

2. If the file does not exist, or has uninitialised values from the template, I believe the result is that some tests fail because they cannot setup their test data properly. (A long time ago I made one of the tests emit a helpful message, but I forget which).

3. The wiki has a lot of references to this issue when configuring a new sandbox, but it is easy for users to skip over it without realising the eventual consequences.

Unless you can see any drawback, I intend to change the way the build handles this file. I want to create a new target called "prepare-local-accounts" (or prepare-local-test-accounts)

1. The new target will test the availability of the file and fail with a "user friendly" message if it does not exist. (I was not intending to emit a hyperlink to the wiki!)

2. If the file exists, its contents will be loaded without comment. The result of loading an uninitialised template-copy will not change.

3. Obviously, the test target(s) will have a dependency on the new prepare-local-accounts target.

4. Do you think the run target(s) need a dependency on prepare-local-accounts as well?

5. Are there any cruise control issues that I've overlooked?

Regards,

Brian

···

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#2

Hey Brian,

Very good idea! Even though some of the tests are currently failing with
a relatively friendly message, it would only appear after they have run
for a while. Bringing it in build.xml would prevent the tests from
starting which is a lot better than the obscure failure.

Cheers
Emil

Brian Burch написа:

···

Hi, Emil..

Although we haven't seen it lately, there's a long history of new users
tripping over because they haven't used the template to build a local
version of this file. I'll be working on the testing.properties issues
this weekend, but I wanted to check your view on this similar but
unrelated matter...

At the moment, the build loads the contents of the local file with the
simple statement:

<property file="${lib}/accounts.properties"/>

1. I believe this file is ONLY used by the test target(s), not by any of
the run targets.

2. If the file does not exist, or has uninitialised values from the
template, I believe the result is that some tests fail because they
cannot setup their test data properly. (A long time ago I made one of
the tests emit a helpful message, but I forget which).

3. The wiki has a lot of references to this issue when configuring a new
sandbox, but it is easy for users to skip over it without realising the
eventual consequences.

Unless you can see any drawback, I intend to change the way the build
handles this file. I want to create a new target called
"prepare-local-accounts" (or prepare-local-test-accounts)

1. The new target will test the availability of the file and fail with a
"user friendly" message if it does not exist. (I was not intending to
emit a hyperlink to the wiki!)

2. If the file exists, its contents will be loaded without comment. The
result of loading an uninitialised template-copy will not change.

3. Obviously, the test target(s) will have a dependency on the new
prepare-local-accounts target.

4. Do you think the run target(s) need a dependency on
prepare-local-accounts as well?

5. Are there any cruise control issues that I've overlooked?

Regards,

Brian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#3

Emil Ivov wrote:

Very good idea! Even though some of the tests are currently failing with
a relatively friendly message, it would only appear after they have run
for a while. Bringing it in build.xml would prevent the tests from
starting which is a lot better than the obscure failure.

I have the change ready to commit, but you did not answer one of my questions...

Am I right in thinking that accounts.properties is ONLY used by the unit tests, and is NOT used by either the run or run-with-profiler?

I don't want to make the new test a pre-requisite for any targets that don't actually need to use the file.

Thanks,

Brian

···

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#4

Brian Burch написа:

Am I right in thinking that accounts.properties is ONLY used by the unit
tests, and is NOT used by either the run or run-with-profiler?

Oh yes sorry :). Yes you are right. Test is indeed the only target using
accounts.properties[.template].

Cheers
Emil

···

I don't want to make the new test a pre-requisite for any targets that
don't actually need to use the file.

Thanks,

Brian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net