harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stepan Mishura" <stepan.mish...@gmail.com>
Subject Re: [classlib] trying new framework for testing serialization
Date Fri, 30 Jun 2006 10:13:33 GMT
On 6/30/06, Jimmy, Jing Lv wrote:
> Stepan Mishura wrote:
> > Hi Jimmy,
> >
> <SNIP>
> > 3. The test needs ser-files, so it may be necessary to add a method to
> >> create this file easily just like the old framework. I find a protected
> >> method produceGoldenFiles(), is that used for it (why protected?)? This
> >> may be necessary to guildance.
> >> What's more, the ser-file must be end with ".ser", but in new
> framework,
> >> I still find it uses ".dat" . And the path is "test/common/unit/..."
> but
> >> in Harmony's Test Guildance
> tells:"/src/test/resources/serialization..."
> >
> >
> > Yes, I agree that utility method for producing golden files will be
> useful.
> > I didn't think how to implement it yet - so suggestion and patches are
> > welcome.
> >
> I see now, thank you very much Stepan! :)
> To produce golden files,  I believe a little change to
> produceGoldenFiles() may meet this requirement. I'd like to help.:)


But first of all it may change its search path, as when I create a new
> test and try verifyGolden(), I find a FileNotFoundException. It seems
> trying to search "test/common/unit/.../SomeTest.golden.dat", is that
> because of serialization-test for security? Waiting for your refactoring
> :)
> Currently the framework search resource files in the next order:
it tries to load a resource file from the classpath (resource file name
should follow new conventions); if it failed then it loads it in 'old' way (
i.e. using RESOURCE_DIR system property). The 'old' way will be removed
after completing 'security' tests migration.

If you see FileNotFoundException then it means that the framework can find
resource file on the classpath. Please check that:
1) a resource file follows new naming conventions
2) a resource file is on the classpath

BTW, I've refactored one security test[1]. You may wish to use it as

Stepan Mishura

I'll have random access to e-mail starting next week. Please expect some
delay in response.


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

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message