BLE Host - gap test needs to hb when checking tmo. When ensuring that the passage of time causes no effects, the test node needs to call ble_hs_heartbeat() to let the host know that time has passed. This is only necessary because the OS is not running during this test.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/f1020d3e Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/f1020d3e Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/f1020d3e Branch: refs/heads/sterly_refactor Commit: f1020d3e60b743d1784a5225ae9b57a07e5cebf0 Parents: d6fab4d Author: Christopher Collins <[email protected]> Authored: Sun Aug 7 17:58:16 2016 -0700 Committer: Sterling Hughes <[email protected]> Committed: Tue Aug 9 16:05:21 2016 -0700 ---------------------------------------------------------------------- net/nimble/host/src/test/ble_gap_test.c | 1 + 1 file changed, 1 insertion(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/f1020d3e/net/nimble/host/src/test/ble_gap_test.c ---------------------------------------------------------------------- diff --git a/net/nimble/host/src/test/ble_gap_test.c b/net/nimble/host/src/test/ble_gap_test.c index 2d4c551..1943d01 100644 --- a/net/nimble/host/src/test/ble_gap_test.c +++ b/net/nimble/host/src/test/ble_gap_test.c @@ -2324,6 +2324,7 @@ ble_gap_test_util_conn_forever(void) /* Advance 100 seconds; ensure no timeout reported. */ os_time_advance(100 * OS_TICKS_PER_SEC); + ble_gap_heartbeat(); TEST_ASSERT(ble_gap_test_conn_event_type == -1); TEST_ASSERT(ble_gap_conn_active()); }
