Skip to content

Commit

Permalink
disable windows ignored example tests
Browse files Browse the repository at this point in the history
these are too flaky atm,
and no resources at the moment to focus on Windows

contributions of windows users are welcome
  • Loading branch information
GlenDC committed May 19, 2024
1 parent ee8344f commit 7656924
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 62 deletions.
36 changes: 0 additions & 36 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -210,42 +210,6 @@ jobs:
- name: Run tests
run: cargo test --all-features --workspace -- --ignored

test-ignored-windows-msrv:
needs: [check, check-msrv]
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{env.RUST_TOOLCHAIN_MSRV}}
- uses: Swatinem/rust-cache@v2
- name: Run tests
run: cargo test --all-features --workspace -- --ignored

test-ignored-windows-beta:
needs: [check, check-msrv]
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{env.RUST_TOOLCHAIN_BETA}}
- uses: Swatinem/rust-cache@v2
- name: Run tests
run: cargo test --all-features --workspace -- --ignored

test-ignored-windows:
needs: [check, check-msrv]
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{env.RUST_TOOLCHAIN}}
- uses: Swatinem/rust-cache@v2
- name: Run tests
run: cargo test --all-features --workspace -- --ignored

test-ignored-macos-msrv:
needs: [check, check-msrv]
runs-on: macos-latest
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,13 +274,19 @@ but is [tested using Github Actions](https://github.com/plabayo/rama/blob/main/.
| platform | tested | test platform |
|----------|--------|---------------|
| MacOS || M2 (developer laptop) and macos-12 Intel ([GitHub Action](https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners)) |
| Windows || Windows 2022 ([GitHub Action](https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners)) |
| Windows <sup>⚠️</sup> || Windows 2022 ([GitHub Action](https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners)) |
| Linux || Ubuntu 22.04 ([GitHub Action](https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners)) |

Please [open a ticket](https://github.com/plabayo/rama/issues) in case you have compatibility issues for your setup/platform.
Our goal is not to support all possible platformns in the world, but we do want to
support as many as we reasonably can.

> <sup>⚠️</sup> example runner tests are not enabled on Windows as these failed in unpredictable ways.
> It is unclear if this is due to code mistakes or because of the way we run these tests (e.g. hardcoded ports).
> We also are not aware of any production usage of Rama on Windows. We welcome contributions
> from Rama users on Windows with great enthusiasm. And while you are at it,
> feel free to contribute to [Tokio](https://tokio.rs/) as well, given they also lack professional Windows users.
### Minimum supported Rust version

Rama's MSRV is `1.75`.
Expand Down
8 changes: 7 additions & 1 deletion docs/book/src/crate.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,19 @@ but is [tested using Github Actions](https://github.com/plabayo/rama/blob/main/.
| platform | tested | test platform |
|----------|--------|---------------|
| MacOS || M2 (developer laptop) and macos-12 Intel ([GitHub Action](https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners)) |
| Windows || Windows 2022 ([GitHub Action](https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners)) |
| Windows <sup>⚠️</sup> || Windows 2022 ([GitHub Action](https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners)) |
| Linux || Ubuntu 22.04 ([GitHub Action](https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners)) |

Please [open a ticket](https://github.com/plabayo/rama/issues) in case you have compatibility issues for your setup/platform.
Our goal is not to support all possible platformns in the world, but we do want to
support as many as we reasonably can.

> <sup>⚠️</sup> example runner tests are not enabled on Windows as these failed in unpredictable ways.
> It is unclear if this is due to code mistakes or because of the way we run these tests (e.g. hardcoded ports).
> We also are not aware of any production usage of Rama on Windows. We welcome contributions
> from Rama users on Windows with great enthusiasm. And while you are at it,
> feel free to contribute to [Tokio](https://tokio.rs/) as well, given they also lack professional Windows users.
### Minimum supported Rust version

Rama's MSRV is `1.75`.
Expand Down
43 changes: 19 additions & 24 deletions tests/example_tests/tls_termination.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,27 @@ use rama::{http::BodyExtractExt, service::Context};
async fn test_tls_termination() {
utils::init_tracing();

// On windows this test is for some reason flaky... so not run it for now on that platform.
// NOTE: if you are a contributor on windows, feel free to enable this and fix it...
#[cfg(not(target_os = "windows"))]
{
let runner = utils::ExampleRunner::interactive("tls_termination");
let runner = utils::ExampleRunner::interactive("tls_termination");

let reply = runner
.get("http://127.0.0.1:62800")
.send(Context::default())
.await
.unwrap()
.try_into_string()
.await
.unwrap();
let reply = runner
.get("http://127.0.0.1:62800")
.send(Context::default())
.await
.unwrap()
.try_into_string()
.await
.unwrap();

assert_eq!("Hello world!", reply);
assert_eq!("Hello world!", reply);

let reply = runner
.get("https://127.0.0.1:63800")
.send(Context::default())
.await
.unwrap()
.try_into_string()
.await
.unwrap();
let reply = runner
.get("https://127.0.0.1:63800")
.send(Context::default())
.await
.unwrap()
.try_into_string()
.await
.unwrap();

assert_eq!("Hello world!", reply);
}
assert_eq!("Hello world!", reply);
}

0 comments on commit 7656924

Please sign in to comment.