Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

Make terminate event happen earlier and stop adv/scan before closing #196

Merged
merged 2 commits into from
Feb 4, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion test/softdevice_api/testcase_advertising.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ TEST_CASE(CREATE_TEST_NAME_AND_TAGS(
SECTION("extended")
{
const auto maxLengthOfAdvData = testutil::ADV_DATA_BUFFER_SIZE;
const auto maxNumberOfAdvertisements = 200; // Random number of advertisements
const auto maxNumberOfAdvertisements = 10; // Random number of advertisements
const auto advertisementNameLength = 40; // Random advertisement name length
const auto advertisementSetId = 5; // Random advertisement set id

Expand Down Expand Up @@ -331,6 +331,9 @@ TEST_CASE(CREATE_TEST_NAME_AND_TAGS(
// Wait for the test to complete
std::this_thread::sleep_for(std::chrono::seconds(3));

REQUIRE(sd_ble_gap_scan_stop(c->unwrap()) == NRF_SUCCESS);
REQUIRE(sd_ble_gap_adv_stop(p->unwrap(), p->scratchpad.adv_handle) == NRF_SUCCESS);

CHECK(error == false);
CHECK(testSuccess == true);

Expand Down