Comments (4)
Update: Websockets suffer the same problem as request streaming, It sends data directly over the TCP socket (or SSL stream), which as far as I know isn't very testable, so aside from the setup code, there isn't much to test without some sort of fake read/write methods or some debug tools in ASIO (which I don't believe there are)
Edit: a simple client to test the received data might be useful, though I do not believe code coverage and unit tests are important enough to warrant dropping the main issues to write a client, maybe when the code is in a stable state, or if someone kindly opens a PR with such a client implemented
from crow.
Ok so after some research, data coming through a socket by creating our own socket and connecting it to an ioservice, similar to how it's done in tests like simple_url_params
, IDK why I was too blind to see these tests, regardless. I'll be changing the tests for sendfile and request streaming to test using a socket, this should solve the issues above + a new issue i discovered where the tests don't even send the response (hence the lack of coverage for streaming)
from crow.
It might be the case that Mustache Tests are not being considered in coverage. This could be due to the fact that the file being run is a python script that generates temporary files and runs the actual C++ test. Although I'm not 100% sure of it. only 85%
Update: I confirmed GCOV files are only being created for unittest
Update2: Adding a simple line to include mustachetest
in coverage increased mustache.h
coverage from 33.45%
to 91.96%
and finally got us out of the damn red zone
from crow.
SSL tests have been merged into revamped_setup
from crow.
Related Issues (20)
- on windows ssltests are disabled due to path problems for executable
- OSSFuzz Integration HOT 6
- what is [147B blob data] ? HOT 1
- Using crow with classes HOT 1
- Add indentation to json dump HOT 2
- How to deny a response? HOT 3
- Auto-restart Server should be available, Adding Cpase might be a good idea HOT 3
- terminate called after throwing an instance of 'boost::wrapexcept<boost::system::system_error>' HOT 1
- No body in the response to a GET that precedes a HEAD in the same TCP connection HOT 1
- Docker "templates" not working.
- is crow synchronous only? HOT 5
- Fully parsed Request not available in catchall handler HOT 1
- Undefined reference to `AcceptEx` and `GetAcceptExSockaddrs` HOT 2
- Websocket with lots of data and slow clients causes memory issues HOT 2
- mustache features like parents, blocks and dynamic name does not seem to work
- Middleware is not called in case of HTTP upgrade
- CORS problem in 1.1.0 HOT 6
- 101 Switching Protocol in json data on the first request HOT 3
- [Bug?] Running websocket example doesn't work HOT 2
- Not found Crow websocket in Conan HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crow.