diff --git a/tests/netebpfext_unit/netebpfext_unit.cpp b/tests/netebpfext_unit/netebpfext_unit.cpp index ee3b17feae..2004aa089e 100644 --- a/tests/netebpfext_unit/netebpfext_unit.cpp +++ b/tests/netebpfext_unit/netebpfext_unit.cpp @@ -551,11 +551,23 @@ sock_addr_thread_function( break; case SOCK_ADDR_TEST_TYPE_CONNECT: default: + // TODO: Bug filed in catchorg/Catch2#2935. Revert this change once the bug is fixed. +#ifdef _DEBUG + result = FWP_ACTION_PERMIT; +#else result = helper->test_cgroup_inet4_connect(parameters); +#endif break; } +#ifdef _DEBUG + bool validate = (result == _get_fwp_sock_addr_action(port_number) || fault_injection_enabled); + if (!validate) { + REQUIRE(false); + } +#else REQUIRE((result == _get_fwp_sock_addr_action(port_number) || fault_injection_enabled)); +#endif } }