[jira] Commented: (DERBY-1303) The test of derbynet/SuicideOfStreaming.java is failed when programs are build as Insane.

2006-05-08 Thread Tomohito Nakayama (JIRA)
[ 
http://issues.apache.org/jira/browse/DERBY-1303?page=comments#action_12378457 ] 

Tomohito Nakayama commented on DERBY-1303:
--

I think excluding derbynet/SuicideOfStreaming.java when programs are compiled 
as Insane as appropriate solution.

> The test of derbynet/SuicideOfStreaming.java is failed when programs are 
> build as Insane.
> -
>
>  Key: DERBY-1303
>  URL: http://issues.apache.org/jira/browse/DERBY-1303
>  Project: Derby
> Type: Bug

>   Components: Test
> Reporter: Tomohito Nakayama
> Assignee: Tomohito Nakayama

>
> "derbynet/SuicideOfStreaming.java" have dependency on build as Sane.
> When programs are build as Insane, 
> code to cause artificial Exception is not compiled and 
> streaming does not failed in derbynet/SuicideOfStreaming.java as expected in 
> this test program.
> The dependency results in fail of derbynet/SuicideOfStreaming.java when 
> programs are comiled as insane.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



[jira] Commented: (DERBY-1303) The test of derbynet/SuicideOfStreaming.java is failed when programs are build as Insane.

2006-05-10 Thread Tomohito Nakayama (JIRA)
[ 
http://issues.apache.org/jira/browse/DERBY-1303?page=comments#action_12378916 ] 

Tomohito Nakayama commented on DERBY-1303:
--

Next are plans to solve this problem.

1) 
Using "suite" of junit, exclude SuicideOfStreaming test.
Refer to.
http://mail-archives.apache.org/mod_mbox/db-derby-dev/200605.mbox/<44604E2D.1010503%40Sun.COM>

2)
In build.xml, adding derbynet/SuicideOfStreaming.java to DerbyNet.exclude if 
build was Insane.

It seems that 1) is appropriate because test should be handled in test 
framework and not in build framework.

> The test of derbynet/SuicideOfStreaming.java is failed when programs are 
> build as Insane.
> -
>
>  Key: DERBY-1303
>  URL: http://issues.apache.org/jira/browse/DERBY-1303
>  Project: Derby
> Type: Bug

>   Components: Test
>  Environment: 
> http://www.multinet.no/~solberg/public/Apache/TinderBox_Derby/Limited/testSummary-405038.html
> Reporter: Tomohito Nakayama
> Assignee: Tomohito Nakayama

>
> "derbynet/SuicideOfStreaming.java" have dependency on build as Sane.
> When programs are build as Insane, 
> code to cause artificial Exception is not compiled and 
> streaming does not failed in derbynet/SuicideOfStreaming.java as expected in 
> this test program.
> The dependency results in fail of derbynet/SuicideOfStreaming.java when 
> programs are comiled as insane.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



[jira] Commented: (DERBY-1303) The test of derbynet/SuicideOfStreaming.java is failed when programs are build as Insane.

2006-05-10 Thread Tomohito Nakayama (JIRA)
[ 
http://issues.apache.org/jira/browse/DERBY-1303?page=comments#action_12378918 ] 

Tomohito Nakayama commented on DERBY-1303:
--

One problem is that I have not written test using JUnit :(

Examining past mail, I found there exists some information on Wiki.
I will start from this point  
http://wiki.apache.org/db-derby/DerbyJUnitTesting

> The test of derbynet/SuicideOfStreaming.java is failed when programs are 
> build as Insane.
> -
>
>  Key: DERBY-1303
>  URL: http://issues.apache.org/jira/browse/DERBY-1303
>  Project: Derby
> Type: Bug

>   Components: Test
>  Environment: 
> http://www.multinet.no/~solberg/public/Apache/TinderBox_Derby/Limited/testSummary-405038.html
> Reporter: Tomohito Nakayama
> Assignee: Tomohito Nakayama

>
> "derbynet/SuicideOfStreaming.java" have dependency on build as Sane.
> When programs are build as Insane, 
> code to cause artificial Exception is not compiled and 
> streaming does not failed in derbynet/SuicideOfStreaming.java as expected in 
> this test program.
> The dependency results in fail of derbynet/SuicideOfStreaming.java when 
> programs are comiled as insane.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



[jira] Commented: (DERBY-1303) The test of derbynet/SuicideOfStreaming.java is failed when programs are build as Insane.

2006-05-16 Thread Tomohito Nakayama (JIRA)
[ 
http://issues.apache.org/jira/browse/DERBY-1303?page=comments#action_12411951 ] 

Tomohito Nakayama commented on DERBY-1303:
--

Committed the patch.

Deleting   
java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/SuicideOfStreaming.out
Deleting   
java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/SuicideOfStreaming.out
Sending
java/testing/org/apache/derbyTesting/functionTests/suites/derbynetmats.runall
Sending
java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/SuicideOfStreaming.java
Sending
java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/build.xml
Adding 
java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/derbyNet/OwnServerTests.java
Adding 
java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/derbyNet/OwnServerTests_app.properties
Sending
java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/derbyNet/copyfiles.ant
Sending
java/testing/org/apache/derbyTesting/functionTests/util/BaseTestCase.java
Transmitting file data ...
Committed revision 406921.

> The test of derbynet/SuicideOfStreaming.java is failed when programs are 
> build as Insane.
> -
>
>  Key: DERBY-1303
>  URL: http://issues.apache.org/jira/browse/DERBY-1303
>  Project: Derby
> Type: Bug

>   Components: Test
>  Environment: 
> http://www.multinet.no/~solberg/public/Apache/TinderBox_Derby/Limited/testSummary-405038.html
> Reporter: Tomohito Nakayama
> Assignee: Tomohito Nakayama
>  Attachments: DERBY-1303.patch
>
> "derbynet/SuicideOfStreaming.java" have dependency on build as Sane.
> When programs are build as Insane, 
> code to cause artificial Exception is not compiled and 
> streaming does not failed in derbynet/SuicideOfStreaming.java as expected in 
> this test program.
> The dependency results in fail of derbynet/SuicideOfStreaming.java when 
> programs are comiled as insane.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



[jira] Commented: (DERBY-1303) The test of derbynet/SuicideOfStreaming.java is failed when programs are build as Insane.

2006-05-29 Thread Kristian Waagan (JIRA)
[ 
http://issues.apache.org/jira/browse/DERBY-1303?page=comments#action_12413716 ] 

Kristian Waagan commented on DERBY-1303:


Hello Tomohito,

I had a look at the SuicideOfStreaming test. In my opinion, more can be done to 
make it more "JUnit friendly".
That said, I also observe that our JUnit environment lacks some supporting 
functionality. I might take some time to work on the test, but first I have a 
few questions.

1) Is the test supposed to be runnable through it's main method?

2) Do we need support for starting, and shutting down, a network server from a 
JUnit test?
Where should this functionality be placed? As a subclass of BaseJDBCTestCase, 
or in an independent/existing utility class?
Two cases:
a) In same process; is doable. If things go wrong, server dies with the VM.
b) In separate process; more complicated. If the test hangs/fails the server 
process can be left running. This is similar to the existing NetServer, but 
here server management is done by the harness, not the test process itself 
(exception; useprocess=false).

3) Can someone confirm or deny that we have recommended to place JUnit tests in 
the same directory structure as the other tests?

I know of two JUnit tests that require a server to be explicitly started and 
manipulated "outside the harness": SuicideOfStreaming and the tests for 
Connection.isValid().

> The test of derbynet/SuicideOfStreaming.java is failed when programs are 
> build as Insane.
> -
>
>  Key: DERBY-1303
>  URL: http://issues.apache.org/jira/browse/DERBY-1303
>  Project: Derby
> Type: Bug

>   Components: Test
>  Environment: 
> http://www.multinet.no/~solberg/public/Apache/TinderBox_Derby/Limited/testSummary-405038.html
> Reporter: Tomohito Nakayama
> Assignee: Tomohito Nakayama
>  Attachments: DERBY-1303.patch
>
> "derbynet/SuicideOfStreaming.java" have dependency on build as Sane.
> When programs are build as Insane, 
> code to cause artificial Exception is not compiled and 
> streaming does not failed in derbynet/SuicideOfStreaming.java as expected in 
> this test program.
> The dependency results in fail of derbynet/SuicideOfStreaming.java when 
> programs are comiled as insane.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



[jira] Commented: (DERBY-1303) The test of derbynet/SuicideOfStreaming.java is failed when programs are build as Insane.

2006-05-29 Thread Tomohito Nakayama (JIRA)
[ 
http://issues.apache.org/jira/browse/DERBY-1303?page=comments#action_12413728 ] 

Tomohito Nakayama commented on DERBY-1303:
--

Hello.

My thoughts are as next...

1) 
Tests may be runnable as independent program , but not needed to be.

Now we have *.junit support in our test framework, then runnablitily of each 
tests is not needed.
However, there are no need to prohibit it.


2)
Yes. I think we need support for starting and shutdown network server from 
tests.

I saw several tests which start annd shutdown network server, not only 
derbynet/SuicideOfStreaming.junit, 
derbynet/dataSourcePermissions_net.java ,which was touched in DERBY-273 , for 
example.

Then, I think it is natural to support start/shutdown network server in test 
framework.

I prefer to implement code to support this , in class methods of subclass from 
BaseJDBCTestCase.
However, it should be left to programmer who works for it :)

About your two option of "a) or b)", I think it should be possible for 
programmer who implement each tests to choose which.
I think question of "a) or b)" depends on what the individual test does.
Then framework code should support both of them.


3)
I thnk we can place *.junit tests in the same directory as other tests,
because *.junit are tests in the same way as others.

However,I think we should have the list that tells which tests are executed as 
*.junit.
(I think this list should be existed not only for *.junit ,but also for *.java 
*.sql *.unit ... 
That list would help us.)

> The test of derbynet/SuicideOfStreaming.java is failed when programs are 
> build as Insane.
> -
>
>  Key: DERBY-1303
>  URL: http://issues.apache.org/jira/browse/DERBY-1303
>  Project: Derby
> Type: Bug

>   Components: Test
>  Environment: 
> http://www.multinet.no/~solberg/public/Apache/TinderBox_Derby/Limited/testSummary-405038.html
> Reporter: Tomohito Nakayama
> Assignee: Tomohito Nakayama
>  Attachments: DERBY-1303.patch
>
> "derbynet/SuicideOfStreaming.java" have dependency on build as Sane.
> When programs are build as Insane, 
> code to cause artificial Exception is not compiled and 
> streaming does not failed in derbynet/SuicideOfStreaming.java as expected in 
> this test program.
> The dependency results in fail of derbynet/SuicideOfStreaming.java when 
> programs are comiled as insane.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



Re: [jira] Commented: (DERBY-1303) The test of derbynet/SuicideOfStreaming.java is failed when programs are build as Insane.

2006-05-08 Thread Sunitha Kambhampati

Tomohito Nakayama (JIRA) wrote:


"derbynet/SuicideOfStreaming.java" have dependency on build as Sane.
When programs are build as Insane, 
code to cause artificial Exception is not compiled and 
streaming does not failed in derbynet/SuicideOfStreaming.java as expected in this test program.

The dependency results in fail of derbynet/SuicideOfStreaming.java when 
programs are comiled as insane.
   


Hi Tomohito,

Not sure if this will solve this test diff issue, but I think at one 
point, there used to be a way to have separate master files for sane and 
insane jars.


Maybe someone more familiar with the test harness can confirm if that is 
still possible or not. 


Thanks,
Sunitha.




Re: [jira] Commented: (DERBY-1303) The test of derbynet/SuicideOfStreaming.java is failed when programs are build as Insane.

2006-05-08 Thread Andrew McIntyre

On 5/8/06, Sunitha Kambhampati <[EMAIL PROTECTED]> wrote:


Not sure if this will solve this test diff issue, but I think at one
point, there used to be a way to have separate master files for sane and
insane jars.

Maybe someone more familiar with the test harness can confirm if that is
still possible or not.


Actually, it was for running with classes instead of packaged jar
files, not sane/insane. Although, that functionality is still in
FileCompare.java, just unused at the moment.

Instead of trying to make the test harness skip it on insane, what if
the test was rewritten as a junit test, replacing the main method
with:

public void testStreamingBlobSuicide() throws Exception {
 if (SanityManager.DEBUG {
   ij.getPropertyArg(args);
   startServer();
   createTestTable();
   testInterruptedReadOfLob();
   shutdownServer();
 }
}

In an insane build, this will get compiled down to the equivalent of:

public void testStreamingBlobSuicide() throws Exception {
}

And since junit tests have no masters, there won't be any diff that
occurs between the sane and insane builds.

andrew


Re: [jira] Commented: (DERBY-1303) The test of derbynet/SuicideOfStreaming.java is failed when programs are build as Insane.

2006-05-09 Thread Kristian Waagan

Andrew McIntyre wrote:


On 5/8/06, Sunitha Kambhampati <[EMAIL PROTECTED]> wrote:



Not sure if this will solve this test diff issue, but I think at one
point, there used to be a way to have separate master files for sane and
insane jars.

Maybe someone more familiar with the test harness can confirm if that is
still possible or not.



Actually, it was for running with classes instead of packaged jar
files, not sane/insane. Although, that functionality is still in
FileCompare.java, just unused at the moment.

Instead of trying to make the test harness skip it on insane, what if
the test was rewritten as a junit test, replacing the main method
with:

public void testStreamingBlobSuicide() throws Exception {
 if (SanityManager.DEBUG {
   ij.getPropertyArg(args);
   startServer();
   createTestTable();
   testInterruptedReadOfLob();
   shutdownServer();
 }
}

In an insane build, this will get compiled down to the equivalent of:

public void testStreamingBlobSuicide() throws Exception {
}

I'm not a fan of running tests that does nothing. These will be included 
in the list of successful tests etc.


An option to you solution, is to use your approach in the suite command. 
If all such logic is in the suite command, it is a lot easier to see 
what tests will be run (instead of looking through all the test methods).


To illustrate, something like this:
public static Test suite() {
   // Add all methods starting with 'test' as usual
   TestSuite suite = new TestSuite(TestClass.class,
   "Name of 
suite");

   if (SanityManager.DEBUG) {
   // Name of test method must not start with 'test'  
   suite.addTest(new TestClass("saneStreamingBlobSuicide"));

   }
   return suite;
}



--
Kristian


And since junit tests have no masters, there won't be any diff that
occurs between the sane and insane builds.

andrew





Re: [jira] Commented: (DERBY-1303) The test of derbynet/SuicideOfStreaming.java is failed when programs are build as Insane.

2006-05-09 Thread TomohitoNakayama

Hello.

I agree that void test should not be recorded as passed.
I will lists plans for DERBY-1303 on JIRA and select best way from them.

Best regards.


Kristian Waagan wrote:


Andrew McIntyre wrote:


On 5/8/06, Sunitha Kambhampati <[EMAIL PROTECTED]> wrote:



Not sure if this will solve this test diff issue, but I think at one
point, there used to be a way to have separate master files for sane 
and

insane jars.

Maybe someone more familiar with the test harness can confirm if 
that is

still possible or not.




Actually, it was for running with classes instead of packaged jar
files, not sane/insane. Although, that functionality is still in
FileCompare.java, just unused at the moment.

Instead of trying to make the test harness skip it on insane, what if
the test was rewritten as a junit test, replacing the main method
with:

public void testStreamingBlobSuicide() throws Exception {
 if (SanityManager.DEBUG {
   ij.getPropertyArg(args);
   startServer();
   createTestTable();
   testInterruptedReadOfLob();
   shutdownServer();
 }
}

In an insane build, this will get compiled down to the equivalent of:

public void testStreamingBlobSuicide() throws Exception {
}

I'm not a fan of running tests that does nothing. These will be 
included in the list of successful tests etc.


An option to you solution, is to use your approach in the suite 
command. If all such logic is in the suite command, it is a lot easier 
to see what tests will be run (instead of looking through all the test 
methods).


To illustrate, something like this:
public static Test suite() {
   // Add all methods starting with 'test' as usual
   TestSuite suite = new TestSuite(TestClass.class,
   "Name of 
suite");

   if (SanityManager.DEBUG) {
   // Name of test method must not start with 'test' 
suite.addTest(new TestClass("saneStreamingBlobSuicide"));

   }
   return suite;
}



--
Kristian


And since junit tests have no masters, there won't be any diff that
occurs between the sane and insane builds.

andrew








--
/*

   Tomohito Nakayama
   [EMAIL PROTECTED]
   [EMAIL PROTECTED]
   [EMAIL PROTECTED]

   Naka
   http://www5.ocn.ne.jp/~tomohito/TopPage.html

*/ 



[Fwd: [jira] Commented: (DERBY-1303) The test of derbynet/SuicideOfStreaming.java is failed when programs are build as Insane.]

2006-05-10 Thread Kristian Waagan

Hello Tomohito,

Hope it's okay I send you a private mail.

I just want to tell you that the Wiki page has not been used/follow by 
many, and I would appreciate if you gave some feedback (to the list) on 
what is missing on it. What information did you not find that was 
necessary for you to write your JUnit test?


I will try to add new content as people request it.


If you ask JUnit questions on the list I will pay extra and try to help 
out (but I am going to JavaOne in USA on Friday, so I might not be able 
to read mail as often as usual).




regards,
--
Kristian
--- Begin Message ---
[ 
http://issues.apache.org/jira/browse/DERBY-1303?page=comments#action_12378918 ] 

Tomohito Nakayama commented on DERBY-1303:
--

One problem is that I have not written test using JUnit :(

Examining past mail, I found there exists some information on Wiki.
I will start from this point  
http://wiki.apache.org/db-derby/DerbyJUnitTesting

> The test of derbynet/SuicideOfStreaming.java is failed when programs are 
> build as Insane.
> -
>
>  Key: DERBY-1303
>  URL: http://issues.apache.org/jira/browse/DERBY-1303
>  Project: Derby
> Type: Bug

>   Components: Test
>  Environment: 
> http://www.multinet.no/~solberg/public/Apache/TinderBox_Derby/Limited/testSummary-405038.html
> Reporter: Tomohito Nakayama
> Assignee: Tomohito Nakayama

>
> "derbynet/SuicideOfStreaming.java" have dependency on build as Sane.
> When programs are build as Insane, 
> code to cause artificial Exception is not compiled and 
> streaming does not failed in derbynet/SuicideOfStreaming.java as expected in 
> this test program.
> The dependency results in fail of derbynet/SuicideOfStreaming.java when 
> programs are comiled as insane.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

--- End Message ---