Update tests after miss-on-get removal#469
Closed
mszabo-wikia wants to merge 1 commit intofacebook:mainfrom
Closed
Update tests after miss-on-get removal#469mszabo-wikia wants to merge 1 commit intofacebook:mainfrom
mszabo-wikia wants to merge 1 commit intofacebook:mainfrom
Conversation
Since D73554883, mcrouter no longer converts GET errors to misses, which
necessitates updating some relevant tests:
* Update test_mcrouter_serialized and test_mcrouter_states to expect an
error response instead of a miss where necessary.
* Update CarbonRouterClient.basicUsageRemoteThreadClientThreadAffinityMulti
to also accept a CONNECT_TIMEOUT as an expected error response (this
may be the case on some local systems and GitHub Actions).
Make the assertion less cryptic.
Original errors from CI:
```
======================================================================
FAIL: test_failover_limit (mcrouter.test.test_mcrouter_serialized.TestFailoverWithLimit)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/fbcode_builder_getdeps-ZhomeZrunnerZworkZmcrouterZmcrouterZbuildZfbcode_builder/build/mcrouter-CeBnYGY6hczXARtSui5EWvho5spSAKd88uS5EUCPCYM/mcrouter/test/test_mcrouter_serialized.py", line 260, in test_failover_limit
self.assertIsNone(mcr.get("key"))
AssertionError: 'SERVER_ERROR 307 busy' is not None
======================================================================
FAIL: test_failover_limit (mcrouter.test.test_mcrouter_serialized.TestFailoverWithLimitWithErrors)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/fbcode_builder_getdeps-ZhomeZrunnerZworkZmcrouterZmcrouterZbuildZfbcode_builder/build/mcrouter-CeBnYGY6hczXARtSui5EWvho5spSAKd88uS5EUCPCYM/mcrouter/test/test_mcrouter_serialized.py", line 317, in test_failover_limit
self.assertIsNone(mcr.get("key"))
AssertionError: 'SERVER_ERROR Reply timeout' is not None
======================================================================
FAIL: test_failover_limit (mcrouter.test.test_mcrouter_serialized.TestFailoverWithLimitWithTKO)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/fbcode_builder_getdeps-ZhomeZrunnerZworkZmcrouterZmcrouterZbuildZfbcode_builder/build/mcrouter-CeBnYGY6hczXARtSui5EWvho5spSAKd88uS5EUCPCYM/mcrouter/test/test_mcrouter_serialized.py", line 287, in test_failover_limit
self.assertIsNone(mcr.get("key"))
AssertionError: 'SERVER_ERROR 307 busy' is not None
======================================================================
FAIL: test_failover_limit (mcrouter.test.test_mcrouter_serialized.TestFailoverWithLimitWithTKOAndErrors)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/fbcode_builder_getdeps-ZhomeZrunnerZworkZmcrouterZmcrouterZbuildZfbcode_builder/build/mcrouter-CeBnYGY6hczXARtSui5EWvho5spSAKd88uS5EUCPCYM/mcrouter/test/test_mcrouter_serialized.py", line 349, in test_failover_limit
self.assertIsNone(mcr.get("key"))
AssertionError: 'SERVER_ERROR 307 busy' is not None
----------------------------------------------------------------------
Ran 10 tests in 37.751s
FAILED (failures=4)
======================================================================
FAIL: test_mcrouter_states (mcrouter.test.test_mcrouter_states.TestMcrouterStates)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/fbcode_builder_getdeps-ZhomeZrunnerZworkZmcrouterZmcrouterZbuildZfbcode_builder/build/mcrouter-CeBnYGY6hczXARtSui5EWvho5spSAKd88uS5EUCPCYM/mcrouter/test/test_mcrouter_states.py", line 64, in test_mcrouter_states
self.assertEqual(mcr.get("key"), None)
AssertionError: 'SERVER_ERROR Server unavailable. Reason: mc_res_connect_error' != None
[ RUN ] CarbonRouterClient.basicUsageRemoteThreadClientThreadAffinityMulti
/home/runner/work/mcrouter/mcrouter/mcrouter/test/cpp_unit_tests/McrouterClientUsage.cpp:303: Failure
Value of: *reply.result_ref() == carbon::Result::CONNECT_ERROR || *reply.result_ref() == carbon::Result::TKO
Actual: false
Expected: true
```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since D73554883, mcrouter no longer converts GET errors to misses, which necessitates updating some relevant tests:
Original errors from CI: