Work directory cleanup between tests

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Work directory cleanup between tests

Vladimir Ozerov
Folks,

As you know our marshallers persists some data to disk. Namely, mappings
from class name to class ID. For this reason some tests work with clean
work directory, some other tests work with dirty work directory.

This hides some marshaller bugs. E.g. after work dir cleanup I immediately
received several failures in BinaryObjectBuilderSelfTest.

I think we must fix this ASAP and ensure that all tests run in a clean
environment. Probably in test environment we should store this metadata in
a kind of node-bound HashMap or so.

Thoughts?

Vladimir.
Reply | Threaded
Open this post in threaded view
|

Re: Work directory cleanup between tests

yzhdanov
I am against changing core logic just for test env.

How about cleaning up the disc storage after test class completes?

--Yakov

2015-12-14 10:12 GMT+03:00 Vladimir Ozerov <[hidden email]>:

> Folks,
>
> As you know our marshallers persists some data to disk. Namely, mappings
> from class name to class ID. For this reason some tests work with clean
> work directory, some other tests work with dirty work directory.
>
> This hides some marshaller bugs. E.g. after work dir cleanup I immediately
> received several failures in BinaryObjectBuilderSelfTest.
>
> I think we must fix this ASAP and ensure that all tests run in a clean
> environment. Probably in test environment we should store this metadata in
> a kind of node-bound HashMap or so.
>
> Thoughts?
>
> Vladimir.
>
Reply | Threaded
Open this post in threaded view
|

Re: Work directory cleanup between tests

Vladimir Ozerov
This doesn't work because there still will be interference between tests
within the same class.

Proposed change is minimal. We already have interface - MarshallerContext.
All we need is to create dummy implementation for it and hack a single line
in GridKernalCotextImpl class.

On Mon, Dec 14, 2015 at 12:22 PM, Yakov Zhdanov <[hidden email]> wrote:

> I am against changing core logic just for test env.
>
> How about cleaning up the disc storage after test class completes?
>
> --Yakov
>
> 2015-12-14 10:12 GMT+03:00 Vladimir Ozerov <[hidden email]>:
>
> > Folks,
> >
> > As you know our marshallers persists some data to disk. Namely, mappings
> > from class name to class ID. For this reason some tests work with clean
> > work directory, some other tests work with dirty work directory.
> >
> > This hides some marshaller bugs. E.g. after work dir cleanup I
> immediately
> > received several failures in BinaryObjectBuilderSelfTest.
> >
> > I think we must fix this ASAP and ensure that all tests run in a clean
> > environment. Probably in test environment we should store this metadata
> in
> > a kind of node-bound HashMap or so.
> >
> > Thoughts?
> >
> > Vladimir.
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Work directory cleanup between tests

dsetrakyan
On Mon, Dec 14, 2015 at 1:30 AM, Vladimir Ozerov <[hidden email]>
wrote:

> This doesn't work because there still will be interference between tests
> within the same class.


I agree with Yakov. How about cleaning this marshalling directory right
after the grid stop?Cleaning it more frequently is not justified, as the
marshaling directory should not be tampered with while the grid is running.