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

running test cases on Linux - questions #157

Open
greenozon opened this issue Aug 12, 2024 · 4 comments
Open

running test cases on Linux - questions #157

greenozon opened this issue Aug 12, 2024 · 4 comments

Comments

@greenozon
Copy link

I've got a question on the test cases pass rate
is it expected to be 100%?

I've built fresh lib as per Linux wiki steps
and wanted to see the TC run, but it has lots of fails
OS: Ubuntu 22.04 LTS, x64
tc run log attached

there is even one core dump

./tests/run-tests.sh: line 25: 171885 Aborted                 (core dumped) $f > /dev/null

Ubuntu20.04.LTS_tests_run_results.log

@greenozon greenozon changed the title running test cases running test cases on Linux - questions Aug 12, 2024
@jgaa
Copy link
Owner

jgaa commented Aug 12, 2024

If the test-backend containers are running, the success rate should be 100%.

I have just upgraded my workstation to Ubuntu 24.04. There are a few problems I have to address (one test failing, one compilation error with g++-14, and docker-compose changing name to docker compose (breaking the automated tests).

I'll fix this and release a new version later this week. I'll check the documentation as well, I'll see if I can reproduce any problems with Ubuntu 22.04 LTS, x64 (that's what I used until now, and it used to work).

@greenozon
Copy link
Author

oh, pardon me!
I missed one step from the wiki page:

./create-and-run-containers.sh

after running again with it the pass rate is much, much better as well as no core dumps (btw, is it OK to have core dump even if the step was missed? IMHO it should gracefully report some sort of error ...

failed TC:

testing dbuild/tests/functional/crud_tests
Mon Aug 12 21:20:09 2024 INFO 139755927910208 Logging on level trace. Boost version is 1_74
Mon Aug 12 21:20:09 2024 DEBUG 139755927905856 Worker 0 is starting.
Mon Aug 12 21:20:09 2024 DEBUG 139755927905856 Connecting to 127.0.0.1:3000
Mon Aug 12 21:20:09 2024 DEBUG 139755927905856 Sent POST request to 'http://localhost:3000/posts' {Connection dc903220-29eb-4fb8-a792-ef29624b7bcf {Socket socket# 6 127.0.0.1:39412 <--> 127.0.0.1:3000}}
Mon Aug 12 21:20:09 2024 ERROR 139755927905856 ProcessInWorker: Caught exception: assign_value: Invalid data conversion from string to int*_t
Mon Aug 12 21:20:09 2024 DEBUG 139755927905856 Worker 0 is done.
Mon Aug 12 21:20:09 2024 DEBUG 139755919513152 Worker 0 is starting.
Mon Aug 12 21:20:09 2024 DEBUG 139755919513152 Connecting to 127.0.0.1:3000
Mon Aug 12 21:20:09 2024 DEBUG 139755919513152 Sent OPTIONS request to 'http://localhost:3000/posts' {Connection bd27c294-9004-48d5-8e89-5f1bd4c1e1d5 {Socket socket# 6 127.0.0.1:39418 <--> 127.0.0.1:3000}}
Mon Aug 12 21:20:09 2024 DEBUG 139755919513152 Worker 0 is done.
Mon Aug 12 21:20:09 2024 DEBUG 139755927905856 Worker 0 is starting.
Mon Aug 12 21:20:09 2024 DEBUG 139755927905856 Connecting to 127.0.0.1:3000
Mon Aug 12 21:20:09 2024 DEBUG 139755927905856 Sent HEAD request to 'http://localhost:3000/posts' {Connection 894d9dea-251f-46ef-84a5-0d981e1f608b {Socket socket# 6 127.0.0.1:39422 <--> 127.0.0.1:3000}}
Mon Aug 12 21:20:09 2024 DEBUG 139755927905856 Worker 0 is done.
1 tests FAILED

@jgaa
Copy link
Owner

jgaa commented Aug 14, 2024

The failure is due to a change in a general backend container used to test POST requests. An id value was changed from int to string. The reason it crash is that the test itself don't catch exceptions and there fore the exception from json serialization leaks back to the restc-cpp core, where it is treated as a fatal error and terminate() is called.

I will soon push an update that handle both ;)

@jgaa
Copy link
Owner

jgaa commented Aug 16, 2024

I just merged the fixes to the master branch.

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