test-fullautomation / robotframework

Generic automation framework for acceptance testing and RPA
http://robotframework.org
Apache License 2.0
1 stars 0 forks source link

threading: unwanted warnings in log file #38

Open test-fullautomation opened 7 months ago

test-fullautomation commented 7 months ago

Version AIO 0.9.3

unwanted warning in log file: ..RFStream Warning: keyword - BuiltIn.Sleep did not have a corresponding pop.

To be solved also for other Build-in keywords in similar scenarios.

Following code:

Hello World
    ${var_thrd_1}=   set variable       ${1}
    ${var_thrd_2}=   set variable       ${10}

    THREAD    TEST_THREAD1    False
        sleep    1
        ${var_thrd_1}=   set variable       ${2}
        Log    thread is done...
    END

    THREAD    TEST_THREAD2    False
        sleep    1
        ${var_thrd_2}=   set variable       ${11}
        Log    thread is done...
    END

    log    Variable 'var_thrd_1' before: ${var_thrd_1}
    log    Variable 'var_thrd_2' before: ${var_thrd_2}

    sleep    2
    log    Variable 'var_thrd_1' after: ${var_thrd_1}
    log    Variable 'var_thrd_2' after: ${var_thrd_2}```

Returns:
```$ cd C:\\RobotTest\\testcases ; /usr/bin/env C:\\Users\\pol2hi\\AppData\\Local\\Temp\\rf-ls-run\\run_env_00_n6_dsk_c.bat -u c:\\Program\ Files\\RobotFramework\\robotvscode\\data\\extensions\\robocorp.robotframework-lsp-1.11.0\\src\\robotframework_debug_adapter\\run_robot__main__.py --port 51337 --no-debug -T -d C:\\RobotTest\\testcases\\..\\logfiles -b debug\\threading.log -l htmllog\\threading_log.html -o xmloutput\\threading_output.xml -r htmlreport\\threading_report.html c:\\RobotTest\\testcases\\threading.robot 
==============================================================================
Threading
==============================================================================
Hello World                                                           ..RFStream Warning: keyword - BuiltIn.Sleep did not have a corresponding pop.
Hello World                                                           | PASS |
------------------------------------------------------------------------------
Threading                                                             | PASS |
1 test, 1 passed, 0 failed, 0 unknown
==============================================================================
Debug:   C:\RobotTest\logfiles\debug\threading-20231107-105709.log
Output:  C:\RobotTest\logfiles\xmloutput\threading_output-20231107-105709.xml
Log:     C:\RobotTest\logfiles\htmllog\threading_log-20231107-105709.html
Report:  C:\RobotTest\logfiles\htmlreport\threading_report-20231107-105709.html
milanac030988 commented 7 months ago

The warning log come from the RobotFramework Language Server (lsp) VSCode extension because the lsp hasn't been adapted. It will not occur when running robot file from command line. I'll will modify lsp for adaptation

test-fullautomation commented 7 months ago

Hi Cuong, hm... then we need a fork of lsp, correct? Thank you, Thomas

milanac030988 commented 7 months ago

You've already forked lsp. I've require it 3 weeks ago :)

test-fullautomation commented 7 months ago

Wow, I forgot. But there was no pull-request till now... I synced master with the community.

test-fullautomation commented 7 months ago

Then we also have to see that we get our forked lsp into our pipeline and releases. I create a task for this.