Skip to content

Conversation

mszabo-wikia
Copy link
Contributor

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

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
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants