You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by "Jimmy, Jing Lv" <fi...@gmail.com> on 2006/09/28 07:46:36 UTC

[classlib][test]Deal with un-deleted temp files created in tests

Hi,

     Recently I find some temp files created in tests are not deleted. 
We may delete them, or put them in test/resource .
     1)in module\archive:
       modules\archive\GZIPOutFinish.txt
       modules\archive\GZIPOutClose2.txt
       modules\archive\GZIPOutWrite.txt
       modules\archive\JDK2-3gabba.zip
     Take a close look into it, the first three files are created in 
GZIPOutputStreamTest. Seems the files were deleted in tearDown(), but 
very strangely the lines of deleting files was comment-out without any 
comment. Do anyone know why? If I delete these files, no error was 
occurred in test on winxp.
     And the last file was created ZipFileTest, which has a comment that 
"Note zfile is a user-defined zip file used by other tests and should 
not be deleted", it seems it must be put in resource directory. 
However,if I do delete it in tearDown(), no error was occurred while run 
archive test on winxp.
     2)in luni:
     modules\luni\hyts_missingclass.ser
     This file is created in ObjectInputStreamTest. The test try to test 
serialization, however it did not follow our serialization-test 
framework. The fix is easy (change it to use the framework).
     3)in jndi:
     a new directory "org\apache\harmony\jndi\tests\javax\naming\spi" 
with a file "jndiprovider.properties" and a sub directory "mock".
     This directory is created in NamingManagerTest, I guess it must be 
put in some place in test\resource ?

     Any suggestions/comments? And any more such files to deal? Thanks!
-- 

Best Regards!

Jimmy, Jing Lv
China Software Development Lab, IBM

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: [classlib][test]Deal with un-deleted temp files created in tests

Posted by Alexey Petrenko <al...@gmail.com>.
Sounds reasonable.
And do not forget about great method File.removeOnExit().

SY, Alexey

2006/9/28, Jimmy, Jing Lv <fi...@gmail.com>:
> Hi,
>
>      Recently I find some temp files created in tests are not deleted.
> We may delete them, or put them in test/resource .
>      1)in module\archive:
>        modules\archive\GZIPOutFinish.txt
>        modules\archive\GZIPOutClose2.txt
>        modules\archive\GZIPOutWrite.txt
>        modules\archive\JDK2-3gabba.zip
>      Take a close look into it, the first three files are created in
> GZIPOutputStreamTest. Seems the files were deleted in tearDown(), but
> very strangely the lines of deleting files was comment-out without any
> comment. Do anyone know why? If I delete these files, no error was
> occurred in test on winxp.
>      And the last file was created ZipFileTest, which has a comment that
> "Note zfile is a user-defined zip file used by other tests and should
> not be deleted", it seems it must be put in resource directory.
> However,if I do delete it in tearDown(), no error was occurred while run
> archive test on winxp.
>      2)in luni:
>      modules\luni\hyts_missingclass.ser
>      This file is created in ObjectInputStreamTest. The test try to test
> serialization, however it did not follow our serialization-test
> framework. The fix is easy (change it to use the framework).
>      3)in jndi:
>      a new directory "org\apache\harmony\jndi\tests\javax\naming\spi"
> with a file "jndiprovider.properties" and a sub directory "mock".
>      This directory is created in NamingManagerTest, I guess it must be
> put in some place in test\resource ?
>
>      Any suggestions/comments? And any more such files to deal? Thanks!
> --
>
> Best Regards!
>
> Jimmy, Jing Lv
> China Software Development Lab, IBM
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
>


-- 
Alexey A. Petrenko
Intel Middleware Products Division

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: [classlib][test]Deal with un-deleted temp files created in tests

Posted by Spark Shen <sm...@gmail.com>.
Jimmy, Jing Lv 写道:
> Jimmy, Jing Lv wrote:
>> Hi,
>>
>> Recently I find some temp files created in tests are not deleted. We 
>> may delete them, or put them in test/resource .
>> 1)in module\archive:
>> modules\archive\GZIPOutFinish.txt
>> modules\archive\GZIPOutClose2.txt
>> modules\archive\GZIPOutWrite.txt
>> modules\archive\JDK2-3gabba.zip
>> Take a close look into it, the first three files are created in 
>> GZIPOutputStreamTest. Seems the files were deleted in tearDown(), but 
>> very strangely the lines of deleting files was comment-out without 
>> any comment. Do anyone know why? If I delete these files, no error 
>> was occurred in test on winxp.
>> And the last file was created ZipFileTest, which has a comment that 
>> "Note zfile is a user-defined zip file used by other tests and should 
>> not be deleted", it seems it must be put in resource directory. 
>> However,if I do delete it in tearDown(), no error was occurred while 
>> run archive test on winxp.
>> 2)in luni:
>> modules\luni\hyts_missingclass.ser
>> This file is created in ObjectInputStreamTest. The test try to test 
>> serialization, however it did not follow our serialization-test 
>> framework. The fix is easy (change it to use the framework).
>> 3)in jndi:
>> a new directory "org\apache\harmony\jndi\tests\javax\naming\spi" with 
>> a file "jndiprovider.properties" and a sub directory "mock".
>> This directory is created in NamingManagerTest, I guess it must be 
>> put in some place in test\resource ?
>>
>> Any suggestions/comments? And any more such files to deal? Thanks!
>
>
> If no objection, I'll raise JIRAs and fix them.
>
That would be great, go ahead.

-- 
Spark Shen
China Software Development Lab, IBM


---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: [classlib][test]Deal with un-deleted temp files created in tests

Posted by "Jimmy, Jing Lv" <fi...@gmail.com>.
Jimmy, Jing Lv wrote:
> Hi,
> 
>     Recently I find some temp files created in tests are not deleted. We 
> may delete them, or put them in test/resource .
>     1)in module\archive:
>       modules\archive\GZIPOutFinish.txt
>       modules\archive\GZIPOutClose2.txt
>       modules\archive\GZIPOutWrite.txt
>       modules\archive\JDK2-3gabba.zip
>     Take a close look into it, the first three files are created in 
> GZIPOutputStreamTest. Seems the files were deleted in tearDown(), but 
> very strangely the lines of deleting files was comment-out without any 
> comment. Do anyone know why? If I delete these files, no error was 
> occurred in test on winxp.
>     And the last file was created ZipFileTest, which has a comment that 
> "Note zfile is a user-defined zip file used by other tests and should 
> not be deleted", it seems it must be put in resource directory. 
> However,if I do delete it in tearDown(), no error was occurred while run 
> archive test on winxp.
>     2)in luni:
>     modules\luni\hyts_missingclass.ser
>     This file is created in ObjectInputStreamTest. The test try to test 
> serialization, however it did not follow our serialization-test 
> framework. The fix is easy (change it to use the framework).
>     3)in jndi:
>     a new directory "org\apache\harmony\jndi\tests\javax\naming\spi" 
> with a file "jndiprovider.properties" and a sub directory "mock".
>     This directory is created in NamingManagerTest, I guess it must be 
> put in some place in test\resource ?
> 
>     Any suggestions/comments? And any more such files to deal? Thanks!


If no objection, I'll raise JIRAs and fix them.

-- 

Best Regards!

Jimmy, Jing Lv
China Software Development Lab, IBM

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: [classlib][test]Deal with un-deleted temp files created in tests

Posted by Spark Shen <sm...@gmail.com>.
Jimmy, Jing Lv 写道:
> Hi,
>
> Recently I find some temp files created in tests are not deleted. We 
> may delete them, or put them in test/resource .
> 1)in module\archive:
> modules\archive\GZIPOutFinish.txt
> modules\archive\GZIPOutClose2.txt
> modules\archive\GZIPOutWrite.txt
> modules\archive\JDK2-3gabba.zip
> Take a close look into it, the first three files are created in 
> GZIPOutputStreamTest. Seems the files were deleted in tearDown(), but 
> very strangely the lines of deleting files was comment-out without any 
> comment. Do anyone know why? If I delete these files, no error was 
> occurred in test on winxp.
> And the last file was created ZipFileTest, which has a comment that 
> "Note zfile is a user-defined zip file used by other tests and should 
> not be deleted", it seems it must be put in resource directory. 
> However,if I do delete it in tearDown(), no error was occurred while 
> run archive test on winxp.
> 2)in luni:
> modules\luni\hyts_missingclass.ser
> This file is created in ObjectInputStreamTest. The test try to test 
> serialization, however it did not follow our serialization-test 
> framework. The fix is easy (change it to use the framework).
> 3)in jndi:
> a new directory "org\apache\harmony\jndi\tests\javax\naming\spi" with 
> a file "jndiprovider.properties" and a sub directory "mock".
> This directory is created in NamingManagerTest, I guess it must be put 
> in some place in test\resource ?
>
> Any suggestions/comments? And any more such files to deal? Thanks!
Put them in places where are appropriate according to various guide lines.

Best regards

-- 
Spark Shen
China Software Development Lab, IBM


---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org