Skip to content

Commit

Permalink
TCP Integration Testing (#273)
Browse files Browse the repository at this point in the history
* Add support for TCP integration tests

* Delete unnecessary state tracking

* rename test to tcp_fluent

* remove low priority todo

* KB -> KiB

* Reduce TCP throughput requirement

GHA runners were failing to hit the 1MB mark. This isn't a big deal here,
we're not trying to do a perf test.

* cargo update

* Also assert that any bytes made it through

* print log on shutdown

* bind to localhost

* cleanup port cast

* debugging: run ducks & lading with trace logs

* debug: compatibility with `act` project

* debug: display listen addr

* Solve hanging tests: switch to `wait_with_output`

`wait` does not read from stdio pipes. The lading child processes were
filling their output buffers and locking up. This became much more
likely to occur when I turned up the log levels.

* cleanup: unused import

* only trace lading

* trace errors in tcp generator

* print connection address

* guess: connect by IP

* bring log levels back up
  • Loading branch information
GeorgeHahn committed Aug 18, 2022
1 parent 2dd2304 commit e49debb
Show file tree
Hide file tree
Showing 10 changed files with 320 additions and 129 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
toolchain: stable
override: true
- name: Install protobuf (Apt)
run: sudo apt-get install -y protobuf-compiler
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler
if: matrix.os == 'ubuntu-latest'
- name: Install protobuf (Brew)
run: brew install protobuf
Expand Down
11 changes: 7 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions integration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ Set `PROTOC=/opt/homebrew/bin/protoc` in your shell

Install `protoc` with apt: `apt install protobuf-compiler`

## Run Tests

Integration tests are implemented as rust tests in the `sheepdog` project.

Run them with: `cargo test -p sheepdog`

## Test Flow

Each test's entry point is a normal async rust test in the `sheepdog` crate. The
Expand Down
1 change: 1 addition & 0 deletions integration/ducks/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ publish = false

[dependencies]
anyhow = "1.0"
bytes = "1.0"
entropy = "0.4"
hyper = { version = "0.14", features = ["server"] }
once_cell = "1.0"
Expand Down

0 comments on commit e49debb

Please sign in to comment.