New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DM-28659: Change 1000 to 3 writers in test. #125
Conversation
"""Test for efficient file updating with shared & exclusive locks by serializing a RepositoryCfg to a | ||
location 1000 times. When this was tested on a 2.8 GHz Intel Core i7 macbook pro it took about 1.3 seconds | ||
to run. When the squash performance monitoring framework is done, this test could be monitored in that | ||
system.""" | ||
|
||
def setUp(self): | ||
self.testDir = tempfile.mkdtemp(dir=ROOT, prefix='TestOneThousandWriters-') | ||
self.testDir = tempfile.mkdtemp(dir=ROOT, prefix='TestMultipleWriters-') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not do f{"self.__class__.__name__}-"
for the prefix here, to keep it generic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems a bit too fancy for something that is scheduled to die before the end of the year.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some docstring suggestions.
@@ -167,28 +167,12 @@ def writeCfg(cfg, go): | |||
dp.PosixStorage.putRepositoryCfg(cfg) | |||
|
|||
def testWriteCfg(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docstring please?
tests/test_safeFileIo.py
Outdated
@@ -147,14 +147,14 @@ def testNoChange(self): | |||
self.assertEqual(f.read(), "some test string") | |||
|
|||
|
|||
class TestOneThousandWriters(unittest.TestCase): | |||
class TestMultipleWriters(unittest.TestCase): | |||
"""Test for efficient file updating with shared & exclusive locks by serializing a RepositoryCfg to a | |||
location 1000 times. When this was tested on a 2.8 GHz Intel Core i7 macbook pro it took about 1.3 seconds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is no longer 1000 times. Please update the docstring if anything else needs to change, too.
No description provided.