Skip to content
This repository was archived by the owner on Aug 13, 2026. It is now read-only.

Unit test enhancements - #170

Merged
evanmcc merged 9 commits into
basho:masterfrom
evanmcc:pevm-unittest-determinism
Feb 15, 2013
Merged

Unit test enhancements#170
evanmcc merged 9 commits into
basho:masterfrom
evanmcc:pevm-unittest-determinism

Conversation

@evanmcc

@evanmcc evanmcc commented Nov 20, 2012

Copy link
Copy Markdown
Contributor

This PR provides:

  • a new function, randname(len=12) that creates a random string of ASCII characters.
  • as a convenience, self.bucket_name and self.key_name are set during setup to a new random string.
  • a SKIP_POOL option, since the pool stress test can take a long time
  • a bucket per test run (self.search_bucket) set to a new name with searching enabled.
  • most importantly, it replaces most uses of bucket and key with these new things, so that test results are more resilient to broken or half-working tests, since they're run on a new bucket each time.

This should fix issue #164

@evanmcc

evanmcc commented Nov 20, 2012

Copy link
Copy Markdown
Contributor Author

er... working on an update to merge cleanly with master.

@seancribbs

Copy link
Copy Markdown

@evanmcc Once that merges cleanly, I'll give it a run. My first glance says that yes, this is a good solution.

@evanmcc

evanmcc commented Nov 21, 2012

Copy link
Copy Markdown
Contributor Author

An important issue with this is that it does make a large number of buckets with altered properties, which can eventually make the ring on your test cluster sad. It used to break it right away, but I've reached the limit of the stuff that I can do to make it easier, I think.

Not something to run on a cluster that you care about, I suppose.

@seancribbs

Copy link
Copy Markdown

@evanmcc If we run this against 1.3, we'll be able to clean up properties at least a little thanks to @jrwest. Once we have the feature detection in there, we could conditionally clear the properties.

@evanmcc

evanmcc commented Nov 23, 2012

Copy link
Copy Markdown
Contributor Author

Had thought about that. How do we use it, just call a HTTP DELETE on the
bucket?

On Fri, Nov 23, 2012 at 11:48 AM, Sean Cribbs notifications@github.comwrote:

@evanmcc https://github.com/evanmcc If we run this against 1.3, we'll
be able to clean up properties at least a little thanks to @jrwesthttps://github.com/jrwest.
Once we have the feature detection in there, we could conditionally clear
the properties.


Reply to this email directly or view it on GitHubhttps://github.com//pull/170#issuecomment-10668343.

@jrwest

jrwest commented Nov 24, 2012

Copy link
Copy Markdown

@evanmcc yea but its only supported in the newer api, however, so DELETE /buckets/<bucket>/props.

@ghost ghost assigned evanmcc Dec 19, 2012
@evanmcc

evanmcc commented Dec 19, 2012

Copy link
Copy Markdown
Contributor Author

was about to fix build_rest_path to use the v2 path spec, but then realized that your refactor of the transports likely includes it, @seancribbs . This can wait on that to land to get merged.

@seancribbs

Copy link
Copy Markdown

@evanmcc Any chance this could be made to merge cleanly now that #179 landed?

@evanmcc

evanmcc commented Feb 6, 2013

Copy link
Copy Markdown
Contributor Author

Will get work on the merge today.

@evanmcc

evanmcc commented Feb 8, 2013

Copy link
Copy Markdown
Contributor Author

running the tests (skipping pool tests) against a single 1.3rc2 node running the memory backend.

loop 30 times pre ring-clearing commit:

  • first test: Ran 184 tests in 4.065s
  • last test: Ran 184 tests in 16.395s
  • ring size: 150k

post ring-clearing commit:

  • first test: Ran 184 tests in 4.906s
  • last test: Ran 184 tests in 20.775s
  • ring size: 67k

Going to update with some changes to use fewer buckets per run.

@evanmcc

evanmcc commented Feb 13, 2013

Copy link
Copy Markdown
Contributor Author

here lies evan, trolled by a mochiglobal

EDIT: or maybe by his own tyops

@evanmcc

evanmcc commented Feb 13, 2013

Copy link
Copy Markdown
Contributor Author

OK, this should be all done now. Ring size doesn't explode anymore.

There are still a large number of buckets being created, and that's what's causing most of the time growth, but it's much slower now. Still not a great idea on a production cluster, but something that for testing we can live with now, I think.

@evanmcc

evanmcc commented Feb 14, 2013

Copy link
Copy Markdown
Contributor Author

I think I did that just to test and then left it in. I think that I'll move it back to retries to keep the exception. I realize that it's a corner case of a corner case, but what if the HTTP connection isn't set up/accessible?

@evanmcc

evanmcc commented Feb 14, 2013

Copy link
Copy Markdown
Contributor Author

OK, that should, at long last, be it.

@ghost ghost assigned seancribbs Feb 15, 2013
@seancribbs

Copy link
Copy Markdown

Awesome work, @evanmcc, 👍 to merge.

evanmcc added a commit that referenced this pull request Feb 15, 2013
@evanmcc
evanmcc merged commit e7c540c into basho:master Feb 15, 2013
@seancribbs seancribbs removed their assignment May 8, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants