Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 349921 - [DB4O] Create a test config using MEMDB4OStore
Summary: [DB4O] Create a test config using MEMDB4OStore
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.core (show other bugs)
Version: 4.1   Edit
Hardware: PC Windows 7
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Victor Roldan Betancort CLA
QA Contact: Eike Stepper CLA
URL:
Whiteboard: Lighter, Faster and Better
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-21 05:55 EDT by Victor Roldan Betancort CLA
Modified: 2012-09-21 07:18 EDT (History)
1 user (show)

See Also:
stepper: review+
stepper: review+


Attachments
patch v1 (5.17 KB, patch)
2011-07-07 07:38 EDT, Victor Roldan Betancort CLA
no flags Details | Diff
Patch v2 (6.84 KB, patch)
2011-07-08 10:22 EDT, Eike Stepper CLA
no flags Details | Diff
Patch v3 (incremental) (6.09 KB, patch)
2011-07-11 04:39 EDT, Caspar D. CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Victor Roldan Betancort CLA 2011-06-21 05:55:38 EDT
MEMDB4OStore was meant to replace DB4OStore in our test suite, with the purpose of having a blazing fast implementation that makes the execution of the test-suite way faster.

Caspar found that some tests did fail in the file based and not in the membased, so switched the default test config to use the file based.

It would be nice to have another configuration to use the mem based configuration, enabling quick test-driven development. File based config must be executed once the mem-based config passes, to make sure the implementation conforms to the test-suite.
Comment 1 Eike Stepper CLA 2011-06-23 03:59:28 EDT
Moving all open enhancement requests to 4.1
Comment 2 Eike Stepper CLA 2011-07-06 03:51:36 EDT
Any activity here?
Comment 3 Victor Roldan Betancort CLA 2011-07-06 05:17:16 EDT
I'll handle it as soon as Im back to the office :)
Comment 4 Eike Stepper CLA 2011-07-06 05:18:11 EDT
Great ;-)
Comment 5 Caspar D. CLA 2011-07-06 08:34:47 EDT
Just so we don't have any misunderstandings: all that's required
is sth like an AllTestsDB4OMem class and a corresponding launch
config. The MemDB4ORepositoryConfig class itself is still available
(in AllTestsDB4O.java).
Comment 6 Victor Roldan Betancort CLA 2011-07-06 10:27:41 EDT
sure ;)
Comment 7 Victor Roldan Betancort CLA 2011-07-07 07:38:40 EDT
Created attachment 199250 [details]
patch v1

Created AllTestsMEMDB4O
Moved MEMDB4OConfig to AllTestsMEMDB4O

(some tests are failing, but the same way AllTestDB4O does)
Comment 8 Eike Stepper CLA 2011-07-08 10:22:40 EDT
Created attachment 199334 [details]
Patch v2

Our releng version builder was not configured, so nobody noticed that the manifest version was not increased to 4.0.100!
Comment 9 Victor Roldan Betancort CLA 2011-07-08 10:33:01 EDT
Yeah, my bad. In fact, I have the API Baseline deactivate, because I only see errors that ask me to increase to 5.0 :(
Comment 10 Eike Stepper CLA 2011-07-08 10:34:37 EDT
IIRC Caspar had a similar problem. Reinstalling the baseline helped him. I'd first try to click "Reset" in the "Edit Baseline" dialog.
Comment 11 Victor Roldan Betancort CLA 2011-07-08 10:39:02 EDT
Committed to TRUNK, rev 8634
Comment 12 Caspar D. CLA 2011-07-11 04:39:49 EDT
Created attachment 199400 [details]
Patch v3 (incremental)

Can we keep the 2 DB4O configs identical in terms of the tests
that are included/excluded? The following patch achieves this
by having AllTestsMEMDB4O inherit from AllTestsDB4O. It also
adds -Xmx1024m to the launch configs. I was getting some out
of memory errors while running the DB4O suites.
Comment 13 Victor Roldan Betancort CLA 2011-07-11 05:51:26 EDT
Caspar,

In fact I though the same, but forget to take some actions about it :P

I also was getting some memory problems, but not related with the HEAP, but with the PermGen.

Regarding skiped tests on AllTestDB4O, I'd say there are some that could be removed. The branching tests are no longer failing, because probably they are no longer being executed (branching tests shouldn't be executed in a IStore implementation that doesn't not support it).

Also, it would be good to remove those that take too much, and reanalyze the junit report to determine which are now taking way too much. I found some tests in the file based store that were taking between 100 and 200 seconds.

Cheers!
Comment 14 Caspar D. CLA 2011-07-11 07:21:26 EDT
(In reply to comment #13)

> I also was getting some memory problems, but not related with the HEAP, but
> with the PermGen.

I added a setting for that as well.

> Regarding skiped tests on AllTestDB4O, I'd say there are some that could be
> removed. The branching tests are no longer failing, because probably they are
> no longer being executed (branching tests shouldn't be executed in a IStore
> implementation that doesn't not support it).

Yes -- but test-skipping logic like ConfigTest.skipUnlessBranching, doesn't
get invoked until after the whole repo has been set up. And that's done
for every test method if the class declared @NeedsCleanRepo. For our slower
back ends (and that includes disk-based DB4O IMO) it's a serious waste of
time to setUp/tearDown the repo dozens of times without executing any test
logic, easily adding 10 minutes to the suite.

> Also, it would be good to remove those that take too much, and reanalyze the
> junit report to determine which are now taking way too much. I found some tests
> in the file based store that were taking between 100 and 200 seconds.

Yeah I noticed those too, very annoying. I haven't looked at them in detail,
but at first glance they just seemed to be iteratively storing large
numbers of objects. Not sure what the point is of that.. Anyone?
Comment 15 Victor Roldan Betancort CLA 2011-07-11 07:32:50 EDT
> > Regarding skiped tests on AllTestDB4O, I'd say there are some that could be
> > removed. The branching tests are no longer failing, because probably they are
> > no longer being executed (branching tests shouldn't be executed in a IStore
> > implementation that doesn't not support it).
> 
> Yes -- but test-skipping logic like ConfigTest.skipUnlessBranching, doesn't
> get invoked until after the whole repo has been set up. And that's done
> for every test method if the class declared @NeedsCleanRepo. For our slower
> back ends (and that includes disk-based DB4O IMO) it's a serious waste of
> time to setUp/tearDown the repo dozens of times without executing any test
> logic, easily adding 10 minutes to the suite.

I see your point and makes sense. I'd understand that for dozens of tests, but for 3, that's negligible. Wouldn't it be desirable to introduce some skip-ahead mechanism in the test-framework? Not sure how feasible is that...

> > Also, it would be good to remove those that take too much, and reanalyze the
> > junit report to determine which are now taking way too much. I found some tests
> > in the file based store that were taking between 100 and 200 seconds.
> 
> Yeah I noticed those too, very annoying. I haven't looked at them in detail,
> but at first glance they just seemed to be iteratively storing large
> numbers of objects. Not sure what the point is of that.. Anyone?

Yeah, usually just large iterations of some actions, commits with thousands of objects... I wonder how that proves any scalability, if that's the actual intention...
Comment 16 Eike Stepper CLA 2011-07-11 09:20:31 EDT
> > Yes -- but test-skipping logic like ConfigTest.skipUnlessBranching, doesn't
> > get invoked until after the whole repo has been set up. And that's done
> > for every test method if the class declared @NeedsCleanRepo. For our slower
> > back ends (and that includes disk-based DB4O IMO) it's a serious waste of
> > time to setUp/tearDown the repo dozens of times without executing any test
> > logic, easily adding 10 minutes to the suite.
> 
> I see your point and makes sense. I'd understand that for dozens of tests, but
> for 3, that's negligible. Wouldn't it be desirable to introduce some skip-ahead
> mechanism in the test-framework? Not sure how feasible is that...

Method annotations would be a good way.
Comment 17 Caspar D. CLA 2011-07-11 23:18:40 EDT
(In reply to comment #15)

> I see your point and makes sense. I'd understand that for dozens of 
> tests, but for 3, that's negligible.

I'm not sure we understand each other. I disabled 3 test
*classes*, not 3 tests. Those classes are BranchingTest and 2
classes derived from it, altogether containing 54 tests. They take
2-3 minutes on a fast machine, doing nothing but setting up and
tearing down the repo 54 times. I personally find that long enough
to be annoying, when I'm waiting for the tests to complete before
I do a commit.

Besides, it's the principle. With Derby, 54 setups/teardowns would
probably take half an hour.

> Yeah, usually just large iterations of some actions, commits
> with thousands of objects... I wonder how that proves any
> scalability, if that's the actual intention...

The worst offenders are the 2 tests in Bugzilla_259869_Test, which
compare the total time needed for 500 commits of a simple attribute
change, to the time needed for 500 commits of... no change. But
committing a transaction that's not dirty, is a no-op. Nothing
is signaled to the server. I think these tests are meaningless.

Btw, Eike, I see you commented but didn't review. Did you miss the
flag? Maybe 2nd review-requests don't show up on the Mylin radar?
Comment 18 Eike Stepper CLA 2011-07-11 23:41:20 EDT
(In reply to comment #17)
> Btw, Eike, I see you commented but didn't review. Did you miss the
> flag? Maybe 2nd review-requests don't show up on the Mylin radar?

It does, but due to my releng activities my workspace is entirely broken and I didn't have time to fix it yesterday. I still could not apply the patch but from looking at the diff there doesn't seem to be a problem with it.
Comment 19 Caspar D. CLA 2011-07-12 05:49:05 EDT
Committed revision 8671.
Comment 20 Victor Roldan Betancort CLA 2011-07-12 05:53:24 EDT
> I'm not sure we understand each other. I disabled 3 test
> *classes*, not 3 tests. Those classes are BranchingTest and 2
> classes derived from it, altogether containing 54 tests. They take
> 2-3 minutes on a fast machine, doing nothing but setting up and
> tearing down the repo 54 times. I personally find that long enough
> to be annoying, when I'm waiting for the tests to complete before
> I do a commit.

Oh yeah, you are right. I wrote too fast!
Comment 21 Eike Stepper CLA 2012-09-21 07:18:59 EDT
Closing.