Skip to content
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

Merged
merged 2 commits into from Feb 17, 2021
Merged

DM-28659: Change 1000 to 3 writers in test. #125

merged 2 commits into from Feb 17, 2021

Conversation

ktlim
Copy link
Contributor

@ktlim ktlim commented Feb 4, 2021

No description provided.

"""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-')
Copy link
Contributor

@parejkoj parejkoj Feb 5, 2021

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?

Copy link
Contributor Author

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.

Copy link
Contributor

@parejkoj parejkoj left a 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):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docstring please?

@@ -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
Copy link
Contributor

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.

@ktlim ktlim merged commit f32990f into master Feb 17, 2021
@ktlim ktlim deleted the tickets/DM-28659 branch February 17, 2021 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants