Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MSVC] websocketsclient_test failed due to CHECK_EQUAL(ret_msg.length(), body_str.length()) where ret_msg.length()=32 and body_str.length()=5 #1785

Open
Zhaojun-Liu opened this issue Dec 26, 2023 · 1 comment

Comments

@Zhaojun-Liu
Copy link

Hi All,
websocketsclient_test failed, detailed message like below, could you take a look this issue? Thanks.

8/8 Test #8: websocketsclient_test ............***Failed    9.62 sec
Loaded websocketsclient_testd.dll...
=== Running tests from: <static> ===
=== Running tests from: websocketsclient_testd.dll ===
Starting test case authentication_tests:ssl_test...
F:\gitP\microsoft\cpprestsdk\Release\tests\functional\websockets\client\authentication_tests.cpp(105): error: Failure in ssl_test: CHECK_EQUAL(ret_msg.length(), body_str.length()) where ret_msg.length()=32 and body_str.length()=5
 FAILED
F:\gitP\microsoft\cpprestsdk\Release\tests\functional\websockets\client\authentication_tests.cpp(108): error: Failure in ssl_test: CHECK_EQUAL(body_str.compare(ret_str), 0) where body_str.compare(ret_str)=1 and 0=0
 FAILED

Repro steps:

  1. git clone https://github.com/microsoft/cpprestsdk F:\gitP\microsoft\cpprestsdk
  2. git -C "F:\gitP\microsoft\cpprestsdk" reset --hard 9c65488
  3. git -C "F:\gitP\microsoft\cpprestsdk" submodule sync
    git -C "F:\gitP\microsoft\cpprestsdk" submodule foreach git reset --hard
    git -C "F:\gitP\microsoft\cpprestsdk" submodule foreach git clean -xdf
    git -C "F:\gitP\microsoft\cpprestsdk" submodule update --init --recursive
  4. git clone https://github.com/Microsoft/vcpkg F:\gitP\Microsoft\vcpkg
  5. git -C "F:\gitP\Microsoft\vcpkg" reset --hard d99b693
  6. cd F:\gitP\Microsoft\vcpkg
  7. bootstrap-vcpkg.bat 2>&1
  8. vcpkg.exe install --recurse openssl boost-system boost-date-time boost-regex boost-interprocess websocketpp brotli --triplet x64-windows --clean-after-build
  9. mkdir F:\gitP\microsoft\cpprestsdk\build_amd64 & cd F:\gitP\microsoft\cpprestsdk\build_amd64
  10. cmake -G "Visual Studio 17 2022" -A x64 -DCMAKE_SYSTEM_VERSION=10.0.22621.0 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=F:\gitP\Microsoft\vcpkg\scripts\buildsystems\vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows ..
  11. msbuild /m /p:Platform=x64 /p:Configuration=Release cpprestsdk-root.sln /t:Rebuild
  12. ctest --build-config Release --output-on-failure

Detailed log:
test_cpprestsdk.log

Note:
The same steps and build environment worked fine last week, but failed this week.

@pavel-machyniak
Copy link

I have the same issue with tests.
Build on Rocky Linux 9 with OpenSSL 3.0.7, boost 1.84, cpprestsdk 2.10.19.

=== Running tests from: libwebsocketsclient_test.so ===
Starting test case authentication_tests:ssl_test...
/root/cpprestsdk.git/Release/tests/functional/websockets/client/authentication_tests.cpp:105: error: Failure in ssl_test: CHECK_EQUAL(ret_msg.length(), body_str.length()) where ret_msg.length()=32 and body_str.length()=5 FAILED
/root/cpprestsdk.git/Release/tests/functional/websockets/client/authentication_tests.cpp:108: error: Failure in ssl_test: CHECK_EQUAL(body_str.compare(ret_str), 0) where body_str.compare(ret_str)=22 and 0=0 FAILED
Test case authentication_tests:ssl_test FAILED

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants