RequestContext: fix segfaults in the tests
Summary: Update all of the RequestContext tests to use a test fixture that helps ensure they all start from a consistent state. Otherwise tests can end up running with RequestContxt settings left over from previous test functions, which can affect their results. In particular, several tests leave behind data for the "test" key. This causes subsequent calls to `setContextData()` to not actually set new data for this key, but to instead reset its value to null. This would cause many tests to segfault since they did not check if `getContextData()` returned null before dereferencing the result. Reviewed By: yfeldblum, A5he Differential Revision: D9233617 fbshipit-source-id: ce7a7c738592305f01b16fec7796505ea192ede4
Showing
Please register or sign in to comment