Skip to content

Commit 3363838

Browse files
committed
Revert SSE contract test changes.
1 parent c8ed14e commit 3363838

2 files changed

Lines changed: 3 additions & 32 deletions

File tree

contract-tests/sse-contract-tests/README.md

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,6 @@ the other.
55

66
This project implements the test service for the C++ EventSource client.
77

8-
### Usage
9-
10-
```bash
11-
sse-tests [PORT] [--use-curl]
12-
```
13-
14-
- `PORT`: Optional port number (defaults to 8123)
15-
- `--use-curl`: Optional flag to use the CURL-based SSE client implementation instead of the default Boost.Beast/Foxy implementation
16-
17-
Examples:
18-
```bash
19-
# Start on default port 8123 with Foxy client
20-
./sse-tests
21-
22-
# Start on port 9000 with Foxy client
23-
./sse-tests 9000
24-
25-
# Start on default port with CURL client
26-
./sse-tests --use-curl
27-
28-
# Start on port 9000 with CURL client
29-
./sse-tests 9000 --use-curl
30-
```
31-
328
**session (session.hpp)**
339

3410
This provides a simple REST API for creating/destroying

contract-tests/sse-contract-tests/src/main.cpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,9 @@ int main(int argc, char* argv[]) {
2222

2323
std::string const default_port = "8123";
2424
std::string port = default_port;
25-
26-
// Parse command line arguments
27-
for (int i = 1; i < argc; ++i) {
28-
std::string arg = argv[i]; // NOLINT(cppcoreguidelines-pro-bounds-pointer-arithmetic)
29-
if (i == 1 && arg.find("--") != 0) {
30-
// First non-flag argument is the port
31-
port = arg;
32-
}
25+
if (argc == 2) {
26+
port =
27+
argv[1]; // NOLINT(cppcoreguidelines-pro-bounds-pointer-arithmetic)
3328
}
3429

3530
try {

0 commit comments

Comments
 (0)