-
Notifications
You must be signed in to change notification settings - Fork 4
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
mount: Add a stress test with multiple clients #25
mount: Add a stress test with multiple clients #25
Conversation
c32013d
to
461783b
Compare
testcases/mount/mount_stress.py
Outdated
|
||
num_clients = 10 | ||
num_operations = 50 | ||
file_size = 1024 # 1 KB |
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.
Two comments:
- Python supports
2 ** 10
notation (2 to the power of 10), thus no need for extra comment - I would vote for later file size in stress-test, say 8M. With such small file-size each thread may end its I/O before the other had a chance to run.
testcases/mount/mount_stress.py
Outdated
def _generate_random_string(length: int) -> str: | ||
return "".join(random.choice(string.ascii_letters) for _ in range(length)) |
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 ok for small files but if enlarging the file size (to 8M) this would be very inefficient. In mount_io.py
I implemented a pseudo-random bytes sequence generator called _generate_random_bytes
. Maybe we should make it public in common helper module.
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.
Sent PR: #27 to address this
testcases/mount/mount_stress.py
Outdated
with open(os.path.join(root_dir, filename), "w") as file: | ||
file.write(file_content) | ||
|
||
with open(os.path.join(root_dir, filename), "r") as file: | ||
file.read() | ||
|
||
os.remove(os.path.join(root_dir, filename)) |
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.
I would prefer using Python's modern pathlib, as it makes more compact code (without duplication). Something like:
path = pathlib.Path(root_dir, filename)
path.write_text(file_content)
file_content_out = path.read_text()
if file_content_out != file_content:
raise IOError("content mismatch")
path.unlink()
Note that is this code fragment I also check data consistency.
testcases/mount/mount_stress.py
Outdated
for i in range(num_clients): | ||
thread = threading.Thread( | ||
target=_perform_file_operations, args=(i, root_dir) | ||
) | ||
threads.append(thread) | ||
thread.start() |
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.
Maybe have another loop for thread.start
to ensure maximum parallelism. That is, so that no thread will start running while we are still constructing the initial threads-set.
(This one is only nice to have).
testcases/mount/test_mount.py
Outdated
@@ -30,6 +31,7 @@ def mount_check(ipaddr: str, share_name: str) -> None: | |||
os.mkdir(test_dir) | |||
check_io_consistency(test_dir) | |||
check_dbm_consistency(test_dir) | |||
stress_test(test_dir) |
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.
Consider rename to check_mt_stress
or something like it (align names with other test functions).
testcases/mount/mount_stress.py
Outdated
num_clients = 10 | ||
num_operations = 50 | ||
file_size = 1024 # 1 KB |
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.
Would be nice to have those parameters as arguments. Perhaps even run the test multiple times with different set of args.
Thanks for doing this. I am wondering if it is possible to split this out from the current test? The simple mount test which I thought of removing at one time has now evolved to perform io tests and multi mount tests. Maybe we should instead split it into separate io and multimount tests. |
Yes, that can be done, I can take it up as a next PR: #30 |
Having had a quick chat with Shweta, we can consider setting up each of these tests as a separate pytest with a similar setup as described in |
461783b
to
51f7601
Compare
@synarete addressed your comments, though regression will fail (as we have few dependent PRs under review), added next change set to keep this PR open for general review to be in progress. |
/retest all |
cfc75c0
to
a3fd16e
Compare
testcases/mount/mount_stress.py
Outdated
path.write_text(file_content.decode()) | ||
file_content_out = path.read_text() |
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 do you prefer write_text/read_text
instead of write_bytes/read_bytes
? After all, file_content
is bytes
, so what is the added value of converting it to text?
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.
That makes more sense, updated.
testcases/mount/mount_stress.py
Outdated
# Case-1: num_clients = 5, num_operations = 20, file_size = 2**22 | ||
_stress_test(root_dir, 5, 20, 2**22) | ||
# Case-2: num_clients = 10, num_operations = 30, file_size = 2**23 | ||
_stress_test(root_dir, 10, 30, 2**23) | ||
# Case-3: num_clients = 15, num_operations = 40, file_size = 2**24 | ||
_stress_test(root_dir, 10, 40, 2**24) | ||
# Case-4: num_clients = 50, num_operations = 50, file_size = 2**25 | ||
_stress_test(root_dir, 10, 25, 2**25) |
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.
Comments are inconsistent with actual function call.
Consider using Python's explicit argument names instead of redundant comments. Something like:
_stree_test(root_dir, num_clients=5, num_operations=20, file_size=2**22)
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.
I was experimenting with the values, forgot to edit the comments.
19af979
to
8dea54b
Compare
print("Stress test complete.") | ||
|
||
|
||
def check_mnt_stress(root_dir: str) -> None: |
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.
If this were a test we could consider using pytest's parametrize feature for generating the various combinations.
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.
Added a tracker in issue-30
root_dir, num_clients=20, num_operations=40, file_size=2**24 | ||
) | ||
_stress_test( | ||
root_dir, num_clients=15, num_operations=25, file_size=2**25 |
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.
If I did my math right this means were creating files on the multiple gigabytes range, right? If so, I'm a little leery of using APIs like write_bytes
that have to consume a single huge buffer in memory. I would much rather see a loop where the buffer size is something more typical like 4k and then write()
out each chunk in a loop. In my past experience we had a python program reading files from http into a single huge buffer and that ended up taxing the memory of the system, when changing it to a read-write-loop it was much more manageable.
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.
@phlogistonjohn I am a bit confused here: the largest file-size here is 32M, and the overall data-set size if up 480M. Those numbers looks reasonably. In all odds, if we want to split those write/reads into multiple chunks, I would vote for larger chunk sized (say, 1M).
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.
I really can't do math. You are right about the sizes.
I'm fine with the code for now, I just don't find the use-one-buffer approach for all file sizes scalable and so I tend to shy away from it. I'd be open to a buffer size of 1M.
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.
Need one final fix.
testcases/mount/mount_stress.py
Outdated
path.write_bytes(file_content) | ||
file_content_out = path.read_text() |
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.
path.write_bytes
should be paired with path.read_bytes
(instead of path.read_text
). We the current code, I have no idea how this test run successfully given that we use random-bytes for file_content
.
This test simulates multiple clients performing file operations using the concept of threading. Four cases with different number of clients, file operations and file sizes are included to ensure maximum coverage. Signed-off-by: Shwetha K Acharya <Shwetha.K.Acharya@ibm.com>
/retest all |
samba-in-kubernetes/sit-environment#51 reported for CI reporting issues. |
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.
ACK
With this change, multiple test modules triggered from testcases/mount can be run as individual tests complying to pytest standards. Also any number of new tests can be added efficiently on the mount. Old approach: - All the different tests are called from test_mount.py: https://github.com/samba-in-kubernetes/sit-test-cases/blob/main/testcases/mount/test_mount.py - Test_mount.py creates a mount, the required tests are called and then test_mount.py cleans the mount. New approach : - This PR complies with the proposal to use fixtures in order to remove all the load on one single module: samba-in-kubernetes#25 (comment) samba-in-kubernetes#25 (comment) - The tests are no more called from test_mount.py. - Setting up of mount and tearing down of mount is taken care by setup and teardown fixture which is defined in testcases/mount/conftest.py More information about fixtures: https://docs.pytest.org/en/6.2.x/fixture.html - With this change, test files remain the same, but the initiator function starts with keyword test and the each test module starts with keyword 'test' That way the tests are called by pytest. Usage of setup and teardown fixture becomes easily possible. We no more need to to call the test function explictly. This also helps with easy debugging and better understanding of the code, as the tests will be failed at individual mount/IO test. In this case, pytest clearly points which test among test_mount_io.py, test_mount_dbm.py and test_mount_stress.py are failing. Can be very useful - when more and more tests are added - when we want to parse test results in sit-environment project Fixes: samba-in-kubernetes#30 Signed-off-by: Shwetha K Acharya <Shwetha.K.Acharya@ibm.com>
With this change, multiple test modules triggered from testcases/mount can be run as individual tests complying to pytest standards. Also any number of new tests can be added efficiently on the mount. Old approach: - All the different tests are called from test_mount.py: https://github.com/samba-in-kubernetes/sit-test-cases/blob/main/testcases/mount/test_mount.py - Test_mount.py creates a mount, the required tests are called and then test_mount.py cleans the mount. New approach : - This PR complies with the proposal to use fixtures in order to remove all the load on one single module: samba-in-kubernetes#25 (comment) samba-in-kubernetes#25 (comment) - The tests are no more called from test_mount.py. - Setting up of mount and tearing down of mount is taken care by setup and teardown fixture which is defined in testcases/mount/conftest.py More information about fixtures: https://docs.pytest.org/en/6.2.x/fixture.html - With this change, test files remain the same, but the initiator function starts with keyword test and the each test module starts with keyword 'test' That way the tests are called by pytest. Usage of setup and teardown fixture becomes easily possible. We no more need to to call the test function explictly. This also helps with easy debugging and better understanding of the code, as the tests will be failed at individual mount/IO test. In this case, pytest clearly points which test among test_mount_io.py, test_mount_dbm.py and test_mount_stress.py are failing. Can be very useful - when more and more tests are added - when we want to parse test results in sit-environment project Fixes: samba-in-kubernetes#30 Signed-off-by: Shwetha K Acharya <Shwetha.K.Acharya@ibm.com>
With this change, multiple test modules triggered from testcases/mount can be run as individual tests complying to pytest standards. Also any number of new tests can be added efficiently on the mount. Old approach: - All the different tests are called from test_mount.py: https://github.com/samba-in-kubernetes/sit-test-cases/blob/main/testcases/mount/test_mount.py - Test_mount.py creates a mount, the required tests are called and then test_mount.py cleans the mount. New approach : - This PR complies with the proposal to use fixtures in order to remove all the load on one single module: samba-in-kubernetes#25 (comment) samba-in-kubernetes#25 (comment) - The tests are no more called from test_mount.py. - Setting up of mount and tearing down of mount is taken care by setup and teardown fixture which is defined in testcases/mount/conftest.py More information about fixtures: https://docs.pytest.org/en/6.2.x/fixture.html - With this change, test files remain the same, but the initiator function starts with keyword test and the each test module starts with keyword 'test' That way the tests are called by pytest. Usage of setup and teardown fixture becomes easily possible. We no more need to to call the test function explictly. This also helps with easy debugging and better understanding of the code, as the tests will be failed at individual mount/IO test. In this case, pytest clearly points which test among test_mount_io.py, test_mount_dbm.py and test_mount_stress.py are failing. Can be very useful - when more and more tests are added - when we want to parse test results in sit-environment project Fixes: samba-in-kubernetes#30 Signed-off-by: Shwetha K Acharya <Shwetha.K.Acharya@ibm.com>
With this change, multiple test modules triggered from testcases/mount can be run as individual tests complying to pytest standards. Also any number of new tests can be added efficiently on the mount. Old approach: - All the different tests are called from test_mount.py: https://github.com/samba-in-kubernetes/sit-test-cases/blob/main/testcases/mount/test_mount.py - Test_mount.py creates a mount, the required tests are called and then test_mount.py cleans the mount. New approach : - This PR complies with the proposal to use fixtures in order to remove all the load on one single module: samba-in-kubernetes#25 (comment) samba-in-kubernetes#25 (comment) - The tests are no more called from test_mount.py. - Setting up of mount and tearing down of mount is taken care by setup and teardown fixture which is defined in testcases/mount/conftest.py More information about fixtures: https://docs.pytest.org/en/6.2.x/fixture.html - With this change, test files remain the same, but the initiator function starts with keyword test and the each test module starts with keyword 'test' That way the tests are called by pytest. Usage of setup and teardown fixture becomes easily possible. We no more need to to call the test function explictly. This also helps with easy debugging and better understanding of the code, as the tests will be failed at individual mount/IO test. In this case, pytest clearly points which test among test_mount_io.py, test_mount_dbm.py and test_mount_stress.py are failing. Can be very useful - when more and more tests are added - when we want to parse test results in sit-environment project Fixes: samba-in-kubernetes#30 Signed-off-by: Shwetha K Acharya <Shwetha.K.Acharya@ibm.com>
With this change, multiple test modules triggered from testcases/mount can be run as individual tests complying to pytest standards. Also any number of new tests can be added efficiently on the mount. Old approach: - All the different tests are called from test_mount.py: https://github.com/samba-in-kubernetes/sit-test-cases/blob/main/testcases/mount/test_mount.py - Test_mount.py creates a mount, the required tests are called and then test_mount.py cleans the mount. New approach : - This PR complies with the proposal to use fixtures in order to remove all the load on one single module: samba-in-kubernetes#25 (comment) samba-in-kubernetes#25 (comment) - The tests are no more called from test_mount.py. - Setting up of mount and tearing down of mount is taken care by setup and teardown fixture which is defined in testcases/mount/conftest.py More information about fixtures: https://docs.pytest.org/en/6.2.x/fixture.html - With this change, test files remain the same, but the initiator function starts with keyword test and the each test module starts with keyword 'test' That way the tests are called by pytest. Usage of setup and teardown fixture becomes easily possible. We no more need to to call the test function explictly. This also helps with easy debugging and better understanding of the code, as the tests will be failed at individual mount/IO test. In this case, pytest clearly points which test among test_mount_io.py, test_mount_dbm.py and test_mount_stress.py are failing. Can be very useful - when more and more tests are added - when we want to parse test results in sit-environment project Fixes: samba-in-kubernetes#30 Signed-off-by: Shwetha K Acharya <Shwetha.K.Acharya@ibm.com>
With this change, multiple test modules triggered from testcases/mount can be run as individual tests complying to pytest standards. Also any number of new tests can be added efficiently on the mount. Old approach: - All the different tests are called from test_mount.py: https://github.com/samba-in-kubernetes/sit-test-cases/blob/main/testcases/mount/test_mount.py - Test_mount.py creates a mount, the required tests are called and then test_mount.py cleans the mount. New approach : - This PR complies with the proposal to use fixtures in order to remove all the load on one single module: samba-in-kubernetes#25 (comment) samba-in-kubernetes#25 (comment) - The tests are no more called from test_mount.py. - Setting up of mount and tearing down of mount is taken care by setup and teardown fixture which is defined in testcases/mount/conftest.py More information about fixtures: https://docs.pytest.org/en/6.2.x/fixture.html - With this change, test files remain the same, but the initiator function starts with keyword test and the each test module starts with keyword 'test' That way the tests are called by pytest. Usage of setup and teardown fixture becomes easily possible. We no more need to to call the test function explictly. This also helps with easy debugging and better understanding of the code, as the tests will be failed at individual mount/IO test. In this case, pytest clearly points which test among test_mount_io.py, test_mount_dbm.py and test_mount_stress.py are failing. Can be very useful - when more and more tests are added - when we want to parse test results in sit-environment project Fixes: samba-in-kubernetes#30 Signed-off-by: Shwetha K Acharya <Shwetha.K.Acharya@ibm.com>
With this change, multiple test modules triggered from testcases/mount can be run as individual tests complying to pytest standards. Also any number of new tests can be added efficiently on the mount. Old approach: - All the different tests are called from test_mount.py: https://github.com/samba-in-kubernetes/sit-test-cases/blob/main/testcases/mount/test_mount.py - Test_mount.py creates a mount, the required tests are called and then test_mount.py cleans the mount. New approach : - This PR complies with the proposal to use fixtures in order to remove all the load on one single module: samba-in-kubernetes#25 (comment) samba-in-kubernetes#25 (comment) - The tests are no more called from test_mount.py. - Setting up of mount and tearing down of mount is taken care by setup and teardown fixture which is defined in testcases/mount/conftest.py More information about fixtures: https://docs.pytest.org/en/6.2.x/fixture.html - With this change, test files remain the same, but the initiator function starts with keyword test and the each test module starts with keyword 'test' That way the tests are called by pytest. Usage of setup and teardown fixture becomes easily possible. We no more need to to call the test function explictly. This also helps with easy debugging and better understanding of the code, as the tests will be failed at individual mount/IO test. In this case, pytest clearly points which test among test_mount_io.py, test_mount_dbm.py and test_mount_stress.py are failing. Can be very useful - when more and more tests are added - when we want to parse test results in sit-environment project Fixes: samba-in-kubernetes#30 Signed-off-by: Shwetha K Acharya <Shwetha.K.Acharya@ibm.com>
With this change, multiple test modules triggered from testcases/mount can be run as individual tests complying to pytest standards. Also any number of new tests can be added efficiently on the mount. Old approach: - All the different tests are called from test_mount.py: https://github.com/samba-in-kubernetes/sit-test-cases/blob/main/testcases/mount/test_mount.py - Test_mount.py creates a mount, the required tests are called and then test_mount.py cleans the mount. New approach : - This PR complies with the proposal to use fixtures in order to remove all the load on one single module: samba-in-kubernetes#25 (comment) samba-in-kubernetes#25 (comment) - The tests are no more called from test_mount.py. - Setting up of mount and tearing down of mount is taken care by setup and teardown fixture which is defined in testcases/mount/conftest.py More information about fixtures: https://docs.pytest.org/en/6.2.x/fixture.html - With this change, test files remain the same, but the initiator function starts with keyword test and the each test module starts with keyword 'test' That way the tests are called by pytest. Usage of setup and teardown fixture becomes easily possible. We no more need to to call the test function explictly. This also helps with easy debugging and better understanding of the code, as the tests will be failed at individual mount/IO test. In this case, pytest clearly points which test among test_mount_io.py, test_mount_dbm.py and test_mount_stress.py are failing. Can be very useful - when more and more tests are added - when we want to parse test results in sit-environment project Fixes: samba-in-kubernetes#30 Signed-off-by: Shwetha K Acharya <Shwetha.K.Acharya@ibm.com>
With this change, multiple test modules triggered from testcases/mount can be run as individual tests complying to pytest standards. Also any number of new tests can be added efficiently on the mount. Old approach: - All the different tests are called from test_mount.py: https://github.com/samba-in-kubernetes/sit-test-cases/blob/main/testcases/mount/test_mount.py - Test_mount.py creates a mount, the required tests are called and then test_mount.py cleans the mount. New approach : - This PR complies with the proposal to use fixtures in order to remove all the load on one single module: samba-in-kubernetes#25 (comment) samba-in-kubernetes#25 (comment) - The tests are no more called from test_mount.py. - Setting up of mount and tearing down of mount is taken care by setup and teardown fixture which is defined in testcases/mount/conftest.py More information about fixtures: https://docs.pytest.org/en/6.2.x/fixture.html - With this change, test files remain the same, but the initiator function starts with keyword test and the each test module starts with keyword 'test' That way the tests are called by pytest. Usage of setup and teardown fixture becomes easily possible. We no more need to to call the test function explictly. This also helps with easy debugging and better understanding of the code, as the tests will be failed at individual mount/IO test. In this case, pytest clearly points which test among test_mount_io.py, test_mount_dbm.py and test_mount_stress.py are failing. Can be very useful - when more and more tests are added - when we want to parse test results in sit-environment project Fixes: samba-in-kubernetes#30 Signed-off-by: Shwetha K Acharya <Shwetha.K.Acharya@ibm.com>
With this change, multiple test modules triggered from testcases/mount can be run as individual tests complying to pytest standards. Also any number of new tests can be added efficiently on the mount. Old approach: - All the different tests are called from test_mount.py: https://github.com/samba-in-kubernetes/sit-test-cases/blob/main/testcases/mount/test_mount.py - Test_mount.py creates a mount, the required tests are called and then test_mount.py cleans the mount. New approach : - This PR complies with the proposal to use fixtures in order to remove all the load on one single module: samba-in-kubernetes#25 (comment) samba-in-kubernetes#25 (comment) - The tests are no more called from test_mount.py. - Setting up of mount and tearing down of mount is taken care by setup and teardown fixture which is defined in testcases/mount/conftest.py More information about fixtures: https://docs.pytest.org/en/6.2.x/fixture.html - With this change, test files remain the same, but the initiator function starts with keyword test and the each test module starts with keyword 'test' That way the tests are called by pytest. Usage of setup and teardown fixture becomes easily possible. We no more need to to call the test function explictly. This also helps with easy debugging and better understanding of the code, as the tests will be failed at individual mount/IO test. In this case, pytest clearly points which test among test_mount_io.py, test_mount_dbm.py and test_mount_stress.py are failing. Can be very useful - when more and more tests are added - when we want to parse test results in sit-environment project Fixes: samba-in-kubernetes#30 Signed-off-by: Shwetha K Acharya <Shwetha.K.Acharya@ibm.com>
With this change, multiple test modules triggered from testcases/mount can be run as individual tests complying to pytest standards. Also any number of new tests can be added efficiently on the mount. Old approach: - All the different tests are called from test_mount.py: https://github.com/samba-in-kubernetes/sit-test-cases/blob/main/testcases/mount/test_mount.py - Test_mount.py creates a mount, the required tests are called and then test_mount.py cleans the mount. New approach : - This PR complies with the proposal to use fixtures in order to remove all the load on one single module: samba-in-kubernetes#25 (comment) samba-in-kubernetes#25 (comment) - The tests are no more called from test_mount.py. - Setting up of mount and tearing down of mount is taken care by setup and teardown fixture which is defined in testcases/mount/conftest.py More information about fixtures: https://docs.pytest.org/en/6.2.x/fixture.html - With this change, test files remain the same, but the initiator function starts with keyword test and the each test module starts with keyword 'test' That way the tests are called by pytest. Usage of setup and teardown fixture becomes easily possible. We no more need to to call the test function explictly. This also helps with easy debugging and better understanding of the code, as the tests will be failed at individual mount/IO test. In this case, pytest clearly points which test among test_mount_io.py, test_mount_dbm.py and test_mount_stress.py are failing. Can be very useful - when more and more tests are added - when we want to parse test results in sit-environment project Fixes: samba-in-kubernetes#30 Signed-off-by: Shwetha K Acharya <Shwetha.K.Acharya@ibm.com>
With this change, multiple test modules triggered from testcases/mount can be run as individual tests complying to pytest standards. Also any number of new tests can be added efficiently on the mount. Old approach: - All the different tests are called from test_mount.py: https://github.com/samba-in-kubernetes/sit-test-cases/blob/main/testcases/mount/test_mount.py - Test_mount.py creates a mount, the required tests are called and then test_mount.py cleans the mount. New approach : - This PR complies with the proposal to use fixtures in order to remove all the load on one single module: samba-in-kubernetes#25 (comment) samba-in-kubernetes#25 (comment) - The tests are no more called from test_mount.py. - Setting up of mount and tearing down of mount is taken care by setup and teardown fixture which is defined in testcases/mount/conftest.py More information about fixtures: https://docs.pytest.org/en/6.2.x/fixture.html - With this change, test files remain the same, but the initiator function starts with keyword test and the each test module starts with keyword 'test' That way the tests are called by pytest. Usage of setup and teardown fixture becomes easily possible. We no more need to to call the test function explictly. This also helps with easy debugging and better understanding of the code, as the tests will be failed at individual mount/IO test. In this case, pytest clearly points which test among test_mount_io.py, test_mount_dbm.py and test_mount_stress.py are failing. Can be very useful - when more and more tests are added - when we want to parse test results in sit-environment project Fixes: samba-in-kubernetes#30 Signed-off-by: Shwetha K Acharya <Shwetha.K.Acharya@ibm.com>
With this change, multiple test modules triggered from testcases/mount can be run as individual tests complying to pytest standards. Also any number of new tests can be added efficiently on the mount. Old approach: - All the different tests are called from test_mount.py: https://github.com/samba-in-kubernetes/sit-test-cases/blob/main/testcases/mount/test_mount.py - Test_mount.py creates a mount, the required tests are called and then test_mount.py cleans the mount. New approach : - This PR complies with the proposal to use fixtures in order to remove all the load on one single module: samba-in-kubernetes#25 (comment) samba-in-kubernetes#25 (comment) - The tests are no more called from test_mount.py. - Setting up of mount and tearing down of mount is taken care by setup and teardown fixture which is defined in testcases/mount/conftest.py More information about fixtures: https://docs.pytest.org/en/6.2.x/fixture.html - With this change, test files remain the same, but the initiator function starts with keyword test and the each test module starts with keyword 'test' That way the tests are called by pytest. Usage of setup and teardown fixture becomes easily possible. We no more need to to call the test function explictly. This also helps with easy debugging and better understanding of the code, as the tests will be failed at individual mount/IO test. In this case, pytest clearly points which test among test_mount_io.py, test_mount_dbm.py and test_mount_stress.py are failing. Can be very useful - when more and more tests are added - when we want to parse test results in sit-environment project Fixes: samba-in-kubernetes#30 Signed-off-by: Shwetha K Acharya <Shwetha.K.Acharya@ibm.com>
With this change, multiple test modules triggered from testcases/mount can be run as individual tests complying to pytest standards. Also any number of new tests can be added efficiently on the mount. Old approach: - All the different tests are called from test_mount.py: https://github.com/samba-in-kubernetes/sit-test-cases/blob/main/testcases/mount/test_mount.py - Test_mount.py creates a mount, the required tests are called and then test_mount.py cleans the mount. New approach : - This PR complies with the proposal to use fixtures in order to remove all the load on one single module: samba-in-kubernetes#25 (comment) samba-in-kubernetes#25 (comment) - The tests are no more called from test_mount.py. - Setting up of mount and tearing down of mount is taken care by setup and teardown fixture which is defined in testcases/mount/conftest.py More information about fixtures: https://docs.pytest.org/en/6.2.x/fixture.html - With this change, test files remain the same, but the initiator function starts with keyword test and the each test module starts with keyword 'test' That way the tests are called by pytest. Usage of setup and teardown fixture becomes easily possible. We no more need to to call the test function explictly. This also helps with easy debugging and better understanding of the code, as the tests will be failed at individual mount/IO test. In this case, pytest clearly points which test among test_mount_io.py, test_mount_dbm.py and test_mount_stress.py are failing. Can be very useful - when more and more tests are added - when we want to parse test results in sit-environment project Fixes: samba-in-kubernetes#30 Signed-off-by: Shwetha K Acharya <Shwetha.K.Acharya@ibm.com>
With this change, multiple test modules triggered from testcases/mount can be run as individual tests complying to pytest standards. Also any number of new tests can be added efficiently on the mount. Old approach: - All the different tests are called from test_mount.py: https://github.com/samba-in-kubernetes/sit-test-cases/blob/main/testcases/mount/test_mount.py - Test_mount.py creates a mount, the required tests are called and then test_mount.py cleans the mount. New approach : - This PR complies with the proposal to use fixtures in order to remove all the load on one single module: samba-in-kubernetes#25 (comment) samba-in-kubernetes#25 (comment) - The tests are no more called from test_mount.py. - Setting up of mount and tearing down of mount is taken care by setup and teardown fixture which is defined in testcases/mount/conftest.py More information about fixtures: https://docs.pytest.org/en/6.2.x/fixture.html - With this change, test files remain the same, but the initiator function starts with keyword test and the each test module starts with keyword 'test' That way the tests are called by pytest. Usage of setup and teardown fixture becomes easily possible. We no more need to to call the test function explictly. This also helps with easy debugging and better understanding of the code, as the tests will be failed at individual mount/IO test. In this case, pytest clearly points which test among test_mount_io.py, test_mount_dbm.py and test_mount_stress.py are failing. Can be very useful - when more and more tests are added - when we want to parse test results in sit-environment project Fixes: samba-in-kubernetes#30 Signed-off-by: Shwetha K Acharya <Shwetha.K.Acharya@ibm.com>
With this change, multiple test modules triggered from testcases/mount can be run as individual tests complying to pytest standards. Also any number of new tests can be added efficiently on the mount. Old approach: - All the different tests are called from test_mount.py: https://github.com/samba-in-kubernetes/sit-test-cases/blob/main/testcases/mount/test_mount.py - Test_mount.py creates a mount, the required tests are called and then test_mount.py cleans the mount. New approach : - This PR complies with the proposal to use fixtures in order to remove all the load on one single module: samba-in-kubernetes#25 (comment) samba-in-kubernetes#25 (comment) - The tests are no more called from test_mount.py. - Setting up of mount and tearing down of mount is taken care by setup and teardown fixture which is defined in testcases/mount/conftest.py More information about fixtures: https://docs.pytest.org/en/6.2.x/fixture.html - With this change, test files remain the same, but the initiator function starts with keyword test and the each test module starts with keyword 'test' That way the tests are called by pytest. Usage of setup and teardown fixture becomes easily possible. We no more need to to call the test function explictly. This also helps with easy debugging and better understanding of the code, as the tests will be failed at individual mount/IO test. In this case, pytest clearly points which test among test_mount_io.py, test_mount_dbm.py and test_mount_stress.py are failing. Can be very useful - when more and more tests are added - when we want to parse test results in sit-environment project Fixes: samba-in-kubernetes#30 Signed-off-by: Shwetha K Acharya <Shwetha.K.Acharya@ibm.com>
With this change, multiple test modules triggered from testcases/mount can be run as individual tests complying to pytest standards. Also any number of new tests can be added efficiently on the mount. Old approach: - All the different tests are called from test_mount.py: https://github.com/samba-in-kubernetes/sit-test-cases/blob/main/testcases/mount/test_mount.py - Test_mount.py creates a mount, the required tests are called and then test_mount.py cleans the mount. New approach : - This PR complies with the proposal to use fixtures in order to remove all the load on one single module: samba-in-kubernetes#25 (comment) samba-in-kubernetes#25 (comment) - The tests are no more called from test_mount.py. - Setting up of mount and tearing down of mount is taken care by setup and teardown fixture which is defined in testcases/mount/conftest.py More information about fixtures: https://docs.pytest.org/en/6.2.x/fixture.html - With this change, test files remain the same, but the initiator function starts with keyword test and the each test module starts with keyword 'test' That way the tests are called by pytest. Usage of setup and teardown fixture becomes easily possible. We no more need to to call the test function explictly. This also helps with easy debugging and better understanding of the code, as the tests will be failed at individual mount/IO test. In this case, pytest clearly points which test among test_mount_io.py, test_mount_dbm.py and test_mount_stress.py are failing. Can be very useful - when more and more tests are added - when we want to parse test results in sit-environment project Fixes: samba-in-kubernetes#30 Signed-off-by: Shwetha K Acharya <Shwetha.K.Acharya@ibm.com>
With this change, multiple test modules triggered from testcases/mount can be run as individual tests complying to pytest standards. Also any number of new tests can be added efficiently on the mount. Old approach: - All the different tests are called from test_mount.py: https://github.com/samba-in-kubernetes/sit-test-cases/blob/main/testcases/mount/test_mount.py - Test_mount.py creates a mount, the required tests are called and then test_mount.py cleans the mount. New approach : - This PR complies with the proposal to use fixtures in order to remove all the load on one single module: samba-in-kubernetes#25 (comment) samba-in-kubernetes#25 (comment) - The tests are no more called from test_mount.py. - Setting up of mount and tearing down of mount is taken care by setup and teardown fixture which is defined in testcases/mount/conftest.py More information about fixtures: https://docs.pytest.org/en/6.2.x/fixture.html - With this change, test files remain the same, but the initiator function starts with keyword test and the each test module starts with keyword 'test' That way the tests are called by pytest. Usage of setup and teardown fixture becomes easily possible. We no more need to to call the test function explictly. This also helps with easy debugging and better understanding of the code, as the tests will be failed at individual mount/IO test. In this case, pytest clearly points which test among test_mount_io.py, test_mount_dbm.py and test_mount_stress.py are failing. Can be very useful - when more and more tests are added - when we want to parse test results in sit-environment project Fixes: samba-in-kubernetes#30 Signed-off-by: Shwetha K Acharya <Shwetha.K.Acharya@ibm.com>
With this change, multiple test modules triggered from testcases/mount can be run as individual tests complying to pytest standards. Also any number of new tests can be added efficiently on the mount. Old approach: - All the different tests are called from test_mount.py: https://github.com/samba-in-kubernetes/sit-test-cases/blob/main/testcases/mount/test_mount.py - Test_mount.py creates a mount, the required tests are called and then test_mount.py cleans the mount. New approach : - This PR complies with the proposal to use fixtures in order to remove all the load on one single module: samba-in-kubernetes#25 (comment) samba-in-kubernetes#25 (comment) - The tests are no more called from test_mount.py. - Setting up of mount and tearing down of mount is taken care by setup and teardown fixture which is defined in testcases/mount/conftest.py More information about fixtures: https://docs.pytest.org/en/6.2.x/fixture.html - With this change, test files remain the same, but the initiator function starts with keyword test and the each test module starts with keyword 'test' That way the tests are called by pytest. Usage of setup and teardown fixture becomes easily possible. We no more need to to call the test function explictly. This also helps with easy debugging and better understanding of the code, as the tests will be failed at individual mount/IO test. In this case, pytest clearly points which test among test_mount_io.py, test_mount_dbm.py and test_mount_stress.py are failing. Can be very useful - when more and more tests are added - when we want to parse test results in sit-environment project Fixes: samba-in-kubernetes#30 Signed-off-by: Shwetha K Acharya <Shwetha.K.Acharya@ibm.com>
With this change, multiple test modules triggered from testcases/mount can be run as individual tests complying to pytest standards. Also any number of new tests can be added efficiently on the mount. Old approach: - All the different tests are called from test_mount.py: https://github.com/samba-in-kubernetes/sit-test-cases/blob/main/testcases/mount/test_mount.py - Test_mount.py creates a mount, the required tests are called and then test_mount.py cleans the mount. New approach : - This PR complies with the proposal to use fixtures in order to remove all the load on one single module: samba-in-kubernetes#25 (comment) samba-in-kubernetes#25 (comment) - The tests are no more called from test_mount.py. - Setting up of mount and tearing down of mount is taken care by setup and teardown fixture which is defined in testcases/mount/conftest.py More information about fixtures: https://docs.pytest.org/en/6.2.x/fixture.html - With this change, test files remain the same, but the initiator function starts with keyword test and the each test module starts with keyword 'test' That way the tests are called by pytest. Usage of setup and teardown fixture becomes easily possible. We no more need to to call the test function explictly. This also helps with easy debugging and better understanding of the code, as the tests will be failed at individual mount/IO test. In this case, pytest clearly points which test among test_mount_io.py, test_mount_dbm.py and test_mount_stress.py are failing. Can be very useful - when more and more tests are added - when we want to parse test results in sit-environment project Fixes: samba-in-kubernetes#30 Signed-off-by: Shwetha K Acharya <Shwetha.K.Acharya@ibm.com>
With this change, multiple test modules triggered from testcases/mount can be run as individual tests complying to pytest standards. Also any number of new tests can be added efficiently on the mount. Old approach: - All the different tests are called from test_mount.py: https://github.com/samba-in-kubernetes/sit-test-cases/blob/main/testcases/mount/test_mount.py - Test_mount.py creates a mount, the required tests are called and then test_mount.py cleans the mount. New approach : - This PR complies with the proposal to use fixtures in order to remove all the load on one single module: samba-in-kubernetes#25 (comment) samba-in-kubernetes#25 (comment) - The tests are no more called from test_mount.py. - Setting up of mount and tearing down of mount is taken care by setup and teardown fixture which is defined in testcases/mount/conftest.py More information about fixtures: https://docs.pytest.org/en/6.2.x/fixture.html - With this change, test files remain the same, but the initiator function starts with keyword test and the each test module starts with keyword 'test' That way the tests are called by pytest. Usage of setup and teardown fixture becomes easily possible. We no more need to to call the test function explictly. This also helps with easy debugging and better understanding of the code, as the tests will be failed at individual mount/IO test. In this case, pytest clearly points which test among test_mount_io.py, test_mount_dbm.py and test_mount_stress.py are failing. Can be very useful - when more and more tests are added - when we want to parse test results in sit-environment project Fixes: samba-in-kubernetes#30 Signed-off-by: Shwetha K Acharya <Shwetha.K.Acharya@ibm.com>
With this change, multiple test modules triggered from testcases/mount can be run as individual tests complying to pytest standards. Also any number of new tests can be added efficiently on the mount. Old approach: - All the different tests are called from test_mount.py: https://github.com/samba-in-kubernetes/sit-test-cases/blob/main/testcases/mount/test_mount.py - Test_mount.py creates a mount, the required tests are called and then test_mount.py cleans the mount. New approach : - This PR complies with the proposal to use fixtures in order to remove all the load on one single module: samba-in-kubernetes#25 (comment) samba-in-kubernetes#25 (comment) - The tests are no more called from test_mount.py. - Setting up of mount and tearing down of mount is taken care by setup and teardown fixture which is defined in testcases/mount/conftest.py More information about fixtures: https://docs.pytest.org/en/6.2.x/fixture.html - With this change, test files remain the same, but the initiator function starts with keyword test and the each test module starts with keyword 'test' That way the tests are called by pytest. Usage of setup and teardown fixture becomes easily possible. We no more need to to call the test function explictly. This also helps with easy debugging and better understanding of the code, as the tests will be failed at individual mount/IO test. In this case, pytest clearly points which test among test_mount_io.py, test_mount_dbm.py and test_mount_stress.py are failing. Can be very useful - when more and more tests are added - when we want to parse test results in sit-environment project Fixes: samba-in-kubernetes#30 Signed-off-by: Shwetha K Acharya <Shwetha.K.Acharya@ibm.com>
With this change, multiple test modules triggered from testcases/mount can be run as individual tests complying to pytest standards. Also any number of new tests can be added efficiently on the mount. Old approach: - All the different tests are called from test_mount.py: https://github.com/samba-in-kubernetes/sit-test-cases/blob/main/testcases/mount/test_mount.py - Test_mount.py creates a mount, the required tests are called and then test_mount.py cleans the mount. New approach : - This PR complies with the proposal to use fixtures in order to remove all the load on one single module: samba-in-kubernetes#25 (comment) samba-in-kubernetes#25 (comment) - The tests are no more called from test_mount.py. - Setting up of mount and tearing down of mount is taken care by setup and teardown fixture which is defined in testcases/mount/conftest.py More information about fixtures: https://docs.pytest.org/en/6.2.x/fixture.html - With this change, test files remain the same, but the initiator function starts with keyword test and the each test module starts with keyword 'test' That way the tests are called by pytest. Usage of setup and teardown fixture becomes easily possible. We no more need to to call the test function explictly. This also helps with easy debugging and better understanding of the code, as the tests will be failed at individual mount/IO test. In this case, pytest clearly points which test among test_mount_io.py, test_mount_dbm.py and test_mount_stress.py are failing. Can be very useful - when more and more tests are added - when we want to parse test results in sit-environment project Fixes: samba-in-kubernetes#30 Signed-off-by: Shwetha K Acharya <Shwetha.K.Acharya@ibm.com>
With this change, multiple test modules triggered from testcases/mount can be run as individual tests complying to pytest standards. Also any number of new tests can be added efficiently on the mount. Old approach: - All the different tests are called from test_mount.py: https://github.com/samba-in-kubernetes/sit-test-cases/blob/main/testcases/mount/test_mount.py - Test_mount.py creates a mount, the required tests are called and then test_mount.py cleans the mount. New approach : - This PR complies with the proposal to use fixtures in order to remove all the load on one single module: #25 (comment) #25 (comment) - The tests are no more called from test_mount.py. - Setting up of mount and tearing down of mount is taken care by setup and teardown fixture which is defined in testcases/mount/conftest.py More information about fixtures: https://docs.pytest.org/en/6.2.x/fixture.html - With this change, test files remain the same, but the initiator function starts with keyword test and the each test module starts with keyword 'test' That way the tests are called by pytest. Usage of setup and teardown fixture becomes easily possible. We no more need to to call the test function explictly. This also helps with easy debugging and better understanding of the code, as the tests will be failed at individual mount/IO test. In this case, pytest clearly points which test among test_mount_io.py, test_mount_dbm.py and test_mount_stress.py are failing. Can be very useful - when more and more tests are added - when we want to parse test results in sit-environment project Fixes: #30 Signed-off-by: Shwetha K Acharya <Shwetha.K.Acharya@ibm.com>
This test simulates multiple clients performing file operations using the concept of threading.