ARMmbed / mbed-os

Arm Mbed OS is a platform operating system designed for the internet of things
https://mbed.com
Other
4.67k stars 2.98k forks source link

[mbed os]: Greentea BLE testcase is failing with "timeout" error #10111

Closed UrmilaKL closed 5 years ago

UrmilaKL commented 5 years ago

mbed- cli version: 1.8.3 mbed os : 5.11.4

Description: [mbed os]: Greentea test case is failing with "timeout" error

Steps: 1. Fetch latest repo from the git server

  1. Create folder structure as below under TESTS folder TESTS/Group1/TestCase1/main.cpp

Find the below main.cpp attached, Also I have attached the logs with -vv option

Note: I added the 'printf' statement in each of the function where it is getting stuck in "dispatch forever() method, If we remove that code of line test case is passing Let me know if anything else I need to add here

C:\mbed-examples\mbed-os>mbed test -m CY8CKIT_062_WIFI_BT -v -n tests-Group1-setADV_param -vv [mbed-7200] Working path "C:\mbed-examples\mbed-os" (program) [mbed-7200] Exec "c:\python27\python.exe -m pip list -l" in "C:\mbed-examples\mbed-os" Package Version


appdirs 1.4.3 argcomplete 1.9.4 asn1ate 0.6.0 asn1crypto 0.24.0 beautifulsoup4 4.1.0 certifi 2018.11.29 cffi 1.11.5 chardet 3.0.4 colorama 0.4.1 cryptography 2.1.4 Deprecated 1.2.4 ecdsa 0.13 enum34 1.1.6 fasteners 0.14.1 funcsigs 1.0.2 functools32 3.2.3.post2 future 0.17.1 futures 3.2.0 fuzzywuzzy 0.11.0 hgapi 1.7.4 icetea 1.0.2 idna 2.7 intelhex 2.2.1 intervaltree 3.0.2 ipaddress 1.0.22 Jinja2 2.7.3 jsonmerge 1.5.2 jsonpointer 1.14 jsonschema 2.6.0 junit-xml 1.8 lockfile 0.12.2 Logbook 1.4.1 lxml 4.2.5 manifest-tool 1.4.6 MarkupSafe 1.1.0 mbed-cli 1.8.3 mbed-cloud-sdk 2.0.1 mbed-flasher 0.9.2 mbed-greentea 1.5.0 mbed-host-tests 1.4.4 mbed-ls 1.7.1 mbed-os-tools 0.0.2 mbed-test-wrapper 1.0.0 mock 2.0.0 monotonic 1.5 nmap 0.0.1 ntfsutils 0.1.4 pathlib 1.0.1 pbr 5.1.1 pip 19.0.1 prettytable 0.7.2 project-generator 0.8.17 project-generator-definitions 0.2.38 protobuf 3.5.2.post1 py 1.7.0 pyasn1 0.2.3 pycparser 2.19 pyelftools 0.25 PyGithub 1.43.3 PyJWT 1.7.1 pyocd 0.16.0 pyOpenSSL 18.0.0 pyparsing 2.3.0 pyserial 3.0 pyshark-legacy 0.3.8 python-dateutil 2.7.5 python-dotenv 0.10.1 pyusb 1.0.2 pywinusb 0.4.2 PyYAML 4.2b4 requests 2.20.0 semantic-version 2.6.0 semver 2.8.1 setuptools 40.6.3 setuptools-scm 3.2.0 setuptools-scm-git-archive 1.0 six 1.12.0 sortedcontainers 2.1.0 trollius 1.0.4 urllib3 1.23 valinor 0.0.15 websocket-client 0.54.0 wrapt 1.10.11 xmltodict 0.11.0 yattag 1.10.1 yotta 0.18.5 [mbed-7200] Exec "c:\python27\python.exe -u C:\mbed-examples\mbed-os\tools\test.py -t GCC_ARM -m CY8CKIT_062_WIFI_BT --source . --build .\BUILD\tests\CY8CKIT_062_WIFI_BT\GCC_ARM --test-spec .\BUILD\tests\CY8CKIT_062_WIFI_BT\GCC_ARM\test_spec.json --build-data .\BUILD\tests\CY8CKIT_062_WIFI_BT\GCC_ARM\build_data.json -n tests-Group1-setADV_param -v --greentea" in "C:\mbed-examples\mbed-os" Building library mbed-build (CY8CKIT_062_WIFI_BT, GCC_ARM) Scan: mbed-os Macros: -DDEVICE_SPI=1 -DMBED_MPU_CUSTOM -DMBED=1 -DFPU_PRESENT=1 -DDEVICE_PORTINOUT=1 -DTARGET_RTOS_M4_M7 -DDEVICE_RTC=1 -DCOMPONENT_PSA_SRV_EMUL=1 -DDEVICE_SERIAL_ASYNCH=1 -DCMSIS_RTOS -DTARGET_WICED -DDEVICE_ANALOGIN=1 -DCY8C6247BZI_D54 -DTOOLCHAIN_GCC -DMBED_BUILD_TIMESTAMP=1552566410.12 -DTARGET_CORTEX_M -DDEVICE_I2C_ASYNCH=1 -DTARGET_LIKE_CORTEX_M4 -DDEVICE_TRNG=1 -DTARGET_M4 -DTARGET_PSOC6 -DFEATURE_BLE=1 -DCOMPONENT_PSA_SRV_IMPL=1 -DDEVICE_SPI_ASYNCH=1 -DDEVICE_LPTICKER=1 -DDEVICE_ANALOGOUT=1 -DTARGET_MCU_PSOC6_M4 -DTARGET_PSOC6_01 -DDEVICE_INTERRUPTIN=1 -DTARGET_CORTEX -DDEVICE_I2C=1 -DDEVICE_PORTOUT=1 -DCORTEX_M4 -DDEVICE_USTICKER=1 -DDEVICE_STDIO_MESSAGES=1 -DDEVICE_PWMOUT=1 -DTARGET_CYW4343X -DTARGET_FF_ARDUINO -DDEVICE_PORTIN=1 -DTARGET_RELEASE -DCOMPONENT_NSPE=1 -DTOOLCHAIN_GCC_ARM -DMCU_PSOC6_M4 -DDEVICE_SERIAL_FC=1 -DTARGET_CY8CKIT_062_WIFI_BT -DTARGET_CYW43XXX -DTARGET_LIKE_MBED -DMBED_CMSIS_RTOS_CM -DDEVICE_SLEEP=1 -DTARGET_MCU_PSOC6 -DDEVICE_CRC=1 -DTARGET_Cypress -DTARGET_CORDIO -DDEVICE_SERIAL=1 -DDEVICE_FLASH=1 -DARM_MATH_CM4 -DPSOC6_DYNSRM_DISABLE=1 Building project setADV_param (CY8CKIT_062_WIFI_BT, GCC_ARM) Scan: GCC_ARM Scan: setADV_param Macros: -DMBED_MPU_CUSTOM -DMBED=1 -DFPU_PRESENT=1 -DDEVICE_PORTINOUT=1 -DTARGET_RTOS_M4_M7 -DDEVICE_RTC=1 -DCOMPONENT_PSA_SRV_EMUL=1 -DDEVICE_SERIAL_ASYNCH=1 -DCMSIS_RTOS -DTARGET_WICED -DDEVICE_ANALOGIN=1 -DCY8C6247BZI_D54 -DMBED_BUILD_TIMESTAMP=1552566417.11 -DTOOLCHAIN_GCC -DDEVICE_CRC=1 -DTARGET_CORTEX_M -DDEVICE_I2C_ASYNCH=1 -DTARGET_LIKE_CORTEX_M4 -DDEVICE_TRNG=1 -DTARGET_M4 -DTARGET_PSOC6 -DFEATURE_BLE=1 -DCOMPONENT_PSA_SRV_IMPL=1 -DDEVICE_SPI_ASYNCH=1 -DDEVICE_LPTICKER=1 -DDEVICE_ANALOGOUT=1 -DTARGET_MCU_PSOC6_M4 -DTARGET_PSOC6_01 -DDEVICE_INTERRUPTIN=1 -DTARGET_CORTEX -DDEVICE_I2C=1 -DDEVICE_PORTOUT=1 -DCORTEX_M4 -DDEVICE_USTICKER=1 -DDEVICE_STDIO_MESSAGES=1 -DDEVICE_PWMOUT=1 -DTARGET_CYW4343X -DTARGET_FF_ARDUINO -DDEVICE_PORTIN=1 -DTARGET_RELEASE -DCOMPONENT_NSPE=1 -DTOOLCHAIN_GCC_ARM -DMCU_PSOC6_M4 -DDEVICE_SERIAL_FC=1 -DTARGET_CY8CKIT_062_WIFI_BT -DTARGET_CYW43XXX -DTARGET_LIKE_MBED -DMBED_CMSIS_RTOS_CM -DDEVICE_SLEEP=1 -DTARGET_MCU_PSOC6 -DDEVICE_SPI=1 -DTARGET_Cypress -DTARGET_CORDIO -DDEVICE_SERIAL=1 -DDEVICE_FLASH=1 -DARM_MATH_CM4 -DPSOC6_DYNSRM_DISABLE=1 Compile [100.0%]: main.cpp Compile: C:\Program Files (x86)\GNU Tools ARM Embedded\6 2017-q2-update\bin\arm-none-eabi-g++ -std=gnu++98 -fno-rtti -Wvla -c -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -fmessage-length=0 -fno-exceptions -fno-builtin -ffunction-sections -fdata-sections -funsigned-char -MMD -fno-delete-null-pointer-checks -fomit-frame-pointer -Os -g1 -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -DMBED_MPU_CUSTOM -DMBED=1 -DFPU_PRESENT=1 -DDEVICE_PORTINOUT=1 -DTARGET_RTOS_M4_M7 -DDEVICE_RTC=1 -DCOMPONENT_PSA_SRV_EMUL=1 -DDEVICE_SERIAL_ASYNCH=1 -D__CMSIS_RTOS -DTARGET_WICED -DDEVICE_ANALOGIN=1 -DCY8C6247BZI_D54 -DMBED_BUILD_TIMESTAMP=1552566417.11 -DTOOLCHAIN_GCC -DDEVICE_CRC=1 -DTARGET_CORTEX_M -DDEVICE_I2C_ASYNCH=1 -DTARGET_LIKE_CORTEX_M4 -DDEVICE_TRNG=1 -DTARGET_M4 -DTARGET_PSOC6 -DFEATURE_BLE=1 -DCOMPONENT_PSA_SRV_IMPL=1 -DDEVICE_SPI_ASYNCH=1 -DDEVICE_LPTICKER=1 -DDEVICE_ANALOGOUT=1 -DTARGET_MCU_PSOC6_M4 -DTARGET_PSOC6_01 -DDEVICE_INTERRUPTIN=1 -DTARGET_CORTEX -DDEVICE_I2C=1 -DDEVICE_PORTOUT=1 -DCORTEX_M4 -DDEVICE_USTICKER=1 -DDEVICE_STDIO_MESSAGES=1 -DDEVICE_PWMOUT=1 -DTARGET_CYW4343X -DTARGET_FF_ARDUINO -DDEVICE_PORTIN=1 -DTARGET_RELEASE -DCOMPONENT_NSPE=1 -DTOOLCHAIN_GCC_ARM -DMCU_PSOC6_M4 -DDEVICE_SERIAL_FC=1 -DTARGET_CY8CKIT_062_WIFI_BT -DTARGET_CYW43XXX -DTARGET_LIKE_MBED -D__MBED_CMSIS_RTOS_CM -DDEVICE_SLEEP=1 -DTARGET_MCU_PSOC6 -DDEVICE_SPI=1 -DTARGET_Cypress -DTARGET_CORDIO -DDEVICE_SERIAL=1 -DDEVICE_FLASH=1 -DARM_MATH_CM4 -DPSOC6_DYNSRM_DISABLE=1 @.\BUILD\tests\CY8CKIT_062_WIFI_BT\GCC_ARM.\TESTS\Group1\setADV_param.includes_6bea6f4f3490c8ae01894138013a577e.txt -include .\BUILD\tests\CY8CKIT_062_WIFI_BT\GCC_ARM.\TESTS\Group1\setADV_param\mbed_config.h -MD -MF BUILD\tests\CY8CKIT_062_WIFI_BT\GCC_ARM\TESTS\Group1\setADV_param\TESTS\Group1\setADV_param\main.d -o BUILD\tests\CY8CKIT_062_WIFI_BT\GCC_ARM\TESTS\Group1\setADV_param\TESTS\Group1\setADV_param\main.o .\TESTS\Group1\setADV_param\main.cpp [DEBUG] Return: 0 Link: setADV_param Preproc: C:\Program Files (x86)\GNU Tools ARM Embedded\6 2017-q2-update\bin\arm-none-eabi-cpp -E -P BUILD\tests\CY8CKIT_062_WIFI_BT\GCC_ARM\targets\TARGET_Cypress\TARGET_PSOC6\TARGET_CY8CKIT_062_WIFI_BT\device\TOOLCHAIN_GCC_ARM\cy8c6xx7_cm4_dual.ld -Wl,--gc-sections -Wl,--wrap,main -Wl,--wrap,_malloc_r -Wl,--wrap,_free_r -Wl,--wrap,_realloc_r -Wl,--wrap,_memalign_r -Wl,--wrap,_calloc_r -Wl,--wrap,exit -Wl,--wrap,atexit -Wl,-n -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -DMBED_BOOT_STACK_SIZE=1024 -o .\BUILD\tests\CY8CKIT_062_WIFI_BT\GCC_ARM.\TESTS\Group1\setADV_param.link_script.ld [DEBUG] Return: 0 Link: C:\Program Files (x86)\GNU Tools ARM Embedded\6 2017-q2-update\bin\arm-none-eabi-gcc @.\BUILD\tests\CY8CKIT_062_WIFI_BT\GCC_ARM.\TESTS\Group1\setADV_param.link_options.txt [DEBUG] Return: 0 Elf2Bin: setADV_param FromELF: C:\Program Files (x86)\GNU Tools ARM Embedded\6 2017-q2-update\bin\arm-none-eabi-objcopy -O ihex .\BUILD\tests\CY8CKIT_062_WIFI_BT\GCC_ARM.\TESTS\Group1\setADV_param\setADV_param.elf .\BUILD\tests\CY8CKIT_062_WIFI_BT\GCC_ARM.\TESTS\Group1\setADV_param\setADV_param.hex [DEBUG] Return: 0 [DEBUG] M0 core image file found: psoc6_01_cm0p_sleep.hex. [DEBUG] Postprocessing .\BUILD\tests\CY8CKIT_062_WIFI_BT\GCC_ARM.\TESTS\Group1\setADV_param\setADV_param.elf -> .\BUILD\tests\CY8CKIT_062_WIFI_BT\GCC_ARM.\TESTS\Group1\setADV_param\setADV_param.hex [DEBUG] Aligning end from 0x1003867c to 0x10038700 Module .text .data .bss
TESTS\Group1 2928(+29) 4(+0) 164(+0)
[fill] 423(-13) 11(+0) 62(+0)
[lib]\c.a 28961(+0) 2472(+0) 89(+0)
[lib]\gcc.a 3168(+0) 0(+0) 0(+0)
[lib]\misc 252(+0) 16(+0) 28(+0)
[lib]\stdc++.a 1(+0) 0(+0) 0(+0)
[lib]\wiced_drivers.a 36046(+0) 0(+0) 288(+0)
[misc] 8(+0) 88(+0) 0(+0)
cmsis\TARGET_CORTEX_M 1033(+0) 0(+0) 84(+0)
components\802.15.4_RF 168(+0) 0(+0) 0(+0)
components\wifi 28(+0) 0(+0) 0(+0)
drivers\FlashIAP.o 126(+0) 0(+0) 0(+0)
drivers\I2C.o 16(+0) 0(+0) 0(+0)
drivers\RawSerial.o 304(+0) 0(+0) 0(+0)
drivers\Serial.o 36(+0) 0(+0) 0(+0)
drivers\SerialBase.o 814(+0) 0(+0) 0(+0)
drivers\Ticker.o 228(+0) 0(+0) 0(+0)
drivers\Timeout.o 153(+0) 0(+0) 0(+0)
drivers\Timer.o 224(+0) 0(+0) 0(+0)
drivers\TimerEvent.o 124(+0) 0(+0) 0(+0)
drivers\UARTSerial.o 20(+0) 0(+0) 0(+0)
events\EventQueue.o 68(+0) 0(+0) 0(+0)
events\equeue 1134(+0) 0(+0) 0(+0)
features\FEATURE_BLE 102416(+0) 191(+0) 6437(+0)
features\frameworks 5975(+0) 69(+0) 441(+0)
hal\mbed_critical_section_api.o 148(+0) 0(+0) 2(+0)
hal\mbed_gpio.o 374(+0) 0(+0) 0(+0)
hal\mbed_pinmap_common.o 263(+0) 0(+0) 0(+0)
hal\mbed_ticker_api.o 1192(+0) 0(+0) 0(+0)
hal\mbed_us_ticker_api.o 68(+0) 4(+0) 64(+0)
platform\CThunkBase.o 16(+0) 0(+0) 4(+0)
platform\FileBase.o 128(+0) 0(+0) 56(+0)
platform\FileHandle.o 4(+0) 0(+0) 0(+0)
platform\FilePath.o 205(+0) 0(+0) 0(+0)
platform\mbed_alloc_wrappers.o 16(+0) 0(+0) 0(+0)
platform\mbed_assert.o 32(+0) 0(+0) 0(+0)
platform\mbed_board.o 423(+0) 0(+0) 0(+0)
platform\mbed_critical.o 236(+0) 0(+0) 4(+0)
platform\mbed_error.o 1141(+0) 0(+0) 114(+0)
platform\mbed_retarget.o 1823(+0) 260(+0) 64(+0)
platform\mbed_sleep_manager.o 231(+0) 0(+0) 2(+0)
platform\mbed_wait_api_rtos.o 168(+0) 0(+0) 0(+0)
rtos\Mutex.o 276(+0) 0(+0) 0(+0)
rtos\Semaphore.o 6(+0) 0(+0) 0(+0)
rtos\TARGET_CORTEX 8301(+0) 168(+0) 5973(+0)
rtos\ThisThread.o 177(+0) 0(+0) 0(+0)
targets\TARGET_Cypress 19417(+0) 1313(+0) 772(+0)
Subtotals 219299(+16) 4596(+0) 14648(+0)

Total Static RAM memory (data + bss): 19244(+0) bytes Total Flash memory (text + data): 223895(+16) bytes

Image: BUILD/tests/CY8CKIT_062_WIFI_BT/GCC_ARM/TESTS/Group1/setADV_param/setADV_param.hex

Memory map breakdown for built projects (values in Bytes): name target toolchain static_ram total_flash
setADV_param CY8CKIT_062_WIFI_BT GCC_ARM 19244 223895

Build successes:

UrmilaKL commented 5 years ago

Please find the test case here, /* mbed Microcontroller Library

include <events/mbed_events.h>

include

include "ble/BLE.h"

include "ble/Gap.h"

include "ble/services/HeartRateService.h"

include "greentea-client/test_env.h"

include "utest.h"

include "rtos.h"

include "unity.h"

using namespace utest::v1;

void schedule_ble_events(BLE::OnEventsToProcessCallbackContext *context); const static char DEVICE_NAME[] = "MBEDOSHeartrate";

static events::EventQueue event_queue(/ event count / 16 * EVENTS_EVENT_SIZE);

class HeartrateDemo : ble::Gap::EventHandler { public: HeartrateDemo(BLE &ble, events::EventQueue &event_queue) : _ble(ble), _event_queue(event_queue), _led1(LED1, 1), _connected(false), _hr_uuid(GattService::UUID_HEART_RATE_SERVICE), _hr_counter(100), _hr_service(ble, _hr_counter, HeartRateService::LOCATION_FINGER), _adv_data_builder(_adv_buffer) { }

void start() {
    printf("I am in start\n");
    _ble.gap().setEventHandler(this);
     printf("SetEventHandler called\n");
    _ble.init(this, &HeartrateDemo::on_init_complete);
     printf("Initialization Completed\n");
    _event_queue.call_every(500, this, &HeartrateDemo::blink);
    printf("Blink called\n");
    _event_queue.call_every(1000, this, &HeartrateDemo::update_sensor_value);
       printf("Updated sensor called\n");
   _event_queue.dispatch_forever();
    printf("dispatch called\n");
}

private: /* Callback triggered when the ble initialization process has finished / void on_init_complete(BLE::InitializationCompleteCallbackContext *params) { if (params->error != BLE_ERROR_NONE) { printf("Ble initialization failed."); return; }

   // print_mac_address();

    start_advertising();
}

void start_advertising() {
    /* Create advertising parameters and payload */

    ble::AdvertisingParameters adv_parameters(
        ble::advertising_type_t::CONNECTABLE_UNDIRECTED,
        ble::adv_interval_t(ble::millisecond_t(1000))
    );

    _adv_data_builder.setFlags();
    _adv_data_builder.setAppearance(ble::adv_data_appearance_t::GENERIC_HEART_RATE_SENSOR);
    _adv_data_builder.setLocalServiceList(mbed::make_Span(&_hr_uuid, 1));
    _adv_data_builder.setName(DEVICE_NAME);

    /* Setup advertising */

    ble_error_t error = _ble.gap().setAdvertisingParameters(
        ble::LEGACY_ADVERTISING_HANDLE,
        adv_parameters
    );

    if (error) {
        printf("_ble.gap().setAdvertisingParameters() failed\r\n");
        return;
    }

    error = _ble.gap().setAdvertisingPayload(
        ble::LEGACY_ADVERTISING_HANDLE,
        _adv_data_builder.getAdvertisingData()
    );

    if (error) {
        printf("_ble.gap().setAdvertisingPayload() failed\r\n");
        return;
    }

    /* Start advertising */

    error = _ble.gap().startAdvertising(ble::LEGACY_ADVERTISING_HANDLE);

    if (error) {
        printf("_ble.gap().startAdvertising() failed\r\n");
        return;
    }
}

void update_sensor_value() {
    if (_connected) {
        // Do blocking calls or whatever is necessary for sensor polling.
        // In our case, we simply update the HRM measurement.
        _hr_counter++;

        //  100 <= HRM bps <=175
        if (_hr_counter == 175) {
            _hr_counter = 100;
        }

        _hr_service.updateHeartRate(_hr_counter);
        printf("\nHeartRate Measured value is %d \n ", _hr_counter);
    }
}

void blink(void) {
    _led1 = !_led1;
}

private: / Event handler /

void onDisconnectionComplete(const ble::DisconnectionCompleteEvent&) {
     printf("Disocnnection compelted");
    _ble.gap().startAdvertising(ble::LEGACY_ADVERTISING_HANDLE);
    _connected = false;

}

virtual void onConnectionComplete(const ble::ConnectionCompleteEvent &event) {
    if (event.getStatus() == BLE_ERROR_NONE) {
        _connected = true;
        printf("connection compelted");
    }
}

private: BLE &_ble; events::EventQueue &_event_queue; DigitalOut _led1;

bool _connected;

UUID _hr_uuid;

uint8_t _hr_counter;
HeartRateService _hr_service;

uint8_t _adv_buffer[ble::LEGACY_ADVERTISING_MAX_SIZE];
ble::AdvertisingDataBuilder _adv_data_builder;

};

void display() { printf("My Example Application Initialized !\n"); BLE &ble = BLE::Instance(); printf("Instance created\n"); ble.onEventsToProcess(schedule_ble_events); printf("After events process\n"); HeartrateDemo demo(ble, event_queue); printf("After class creation\n"); demo.start(); printf("display function done\n"); TEST_ASSERT(true);

}

void schedule_ble_events(BLE::OnEventsToProcessCallbackContext *context) { event_queue.call(Callback<void()>(&context->ble, &BLE::processEvents)); }

utest::v1::status_t test_setup(const size_t number_of_cases) { // Setup Greentea using a reasonable timeout in seconds GREENTEA_SETUP(100, "default_auto"); return verbose_test_setup_handler(number_of_cases); }

Case cases[] = {

Case("Testing success test", display)

};

Specification specification(test_setup, cases);

int main() { printf("I am in main()"); return !Harness::run(specification); }

ciarmcom commented 5 years ago

Internal Jira reference: https://jira.arm.com/browse/MBOCUSTRIA-1008

UrmilaKL commented 5 years ago

Is there any method so that we can pass time in dispatch_forever() function? like below dispatch(100);

0xc0170 commented 5 years ago

cc @ARMmbed/mbed-os-pan

desmond-blue commented 5 years ago

You can pass in the timeout for dispatch events, please check the documentation.

Take your code for example, dispatch(100) means "Executes events until 100 milliseconds have passed".

linlingao commented 5 years ago

@UrmilaKL I believe @desmond-blue has answered your question. Please close this issue if you have no further questions.

UrmilaKL commented 5 years ago

HI @Desmond-blue, If I add dispatch(100) to my code instead of dispatch_forever() test case is passing, But Like above if I try to add one more class with one more display1 test case, My test case is failing with "TIMEOUT" error, First test case will pass but second one will fail What may be the reason? Thanks Urmila Bhat

desmond-blue commented 5 years ago

@UrmilaKL You could try destructing the BLE and HeardRate objects, after the test case 1 finished.

And please post this kind of questions on our Question or Forum because the two places are best fitted for discussing the application. We really appreciate that.

linlingao commented 5 years ago

It appears Desmond has already answered your question.