Skip to content
This repository was archived by the owner on Mar 25, 2025. It is now read-only.

reintroduce retry service into codebase + add port of tower-test #3

Merged
merged 13 commits into from
Jul 13, 2023
9 changes: 3 additions & 6 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ on:
- master
pull_request: {}

env:
MSRV: 1.49.0

jobs:
check-nightly:
# Run `cargo check` first to ensure that the pushed code at least compiles.
Expand All @@ -17,7 +14,7 @@ jobs:
- uses: actions/checkout@master
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
toolchain: nightly-2023-07-08
profile: minimal
override: true
- name: Check
Expand All @@ -32,7 +29,7 @@ jobs:
- uses: actions/checkout@master
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
toolchain: nightly-2023-07-08
profile: minimal
- name: cargo doc
working-directory: ${{ matrix.subcrate }}
Expand Down Expand Up @@ -86,7 +83,7 @@ jobs:
- uses: actions/checkout@master
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
toolchain: nightly-2023-07-08
components: rustfmt
profile: minimal
- name: rustfmt
Expand Down
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
[workspace]

members = [
"examples/tower-async-http/*",
"tower-async",
"tower-async-http",
"tower-async-bridge",
"tower-async-layer",
"tower-async-service",
"examples/tower-async-http/*",
"tower-async-test",
]

resolver = "2"
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "nightly"
channel = "nightly-2023-07-08"
11 changes: 11 additions & 0 deletions tower-async-test/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased

- Initial release of async fork from
<https://github.com/tower-rs/tower>
27 changes: 27 additions & 0 deletions tower-async-test/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[package]
name = "tower-async-test"
# When releasing to crates.io:
# - Update doc url
# - Cargo.toml
# - README.md
# - Update CHANGELOG.md.
# - Create "v0.1.x" git tag.
version = "0.1.0"
authors = ["Glen De Cauwsemaecker <glen@plabayo.tech>"]
license = "MIT"
repository = "https://github.com/plabayo/tower-async"
homepage = "https://github.com/plabayo/tower-async"
description = """
Utilities for writing client and server `Service` tests.
An "Async Trait" spiritual fork from the original tower-test Library.
"""
categories = ["asynchronous", "network-programming"]
edition = "2021"

[dependencies]
tokio = { version = "1.0", features = ["sync"] }
tower-async-layer = { version = "0.1", path = "../tower-async-layer" }
tower-async-service = { version = "0.1", path = "../tower-async-service" }

[dev-dependencies]
tokio = { version = "1.0", features = ["macros", "rt"] }
26 changes: 26 additions & 0 deletions tower-async-test/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Copyright (c) 2019 Tower Contributors
Copyright (c) 2023 Plabayo

Permission is hereby granted, free of charge, to any
person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the
Software without restriction, including without
limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software
is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice
shall be included in all copies or substantial portions
of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
41 changes: 41 additions & 0 deletions tower-async-test/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Tower Test

Utilities for writing client and server `Service` tests.

[![Crates.io][crates-badge]][crates-url]
[![Documentation][docs-badge]][docs-url]
[![Documentation (master)][docs-master-badge]][docs-master-url]
[![MIT licensed][mit-badge]][mit-url]
[![Build Status][actions-badge]][actions-url]
[![Discord chat][discord-badge]][discord-url]

It is a fork of <https://github.com/tower-rs/tower>
and makes use of `async traits` to simplify things and make it more easier
to integrate async functions into middleware.

Compared to other forks in this mono repository, this specific `tower-async-test` crate is however
only a spiritual fork of `tower-test`, with a completely different implementation,
as the needs are very different then when using a classifc ``

[crates-badge]: https://img.shields.io/crates/v/tower-test.svg
[crates-url]: https://crates.io/crates/tower-test
[docs-badge]: https://docs.rs/tower-test/badge.svg
[docs-url]: https://docs.rs/tower-test
[docs-master-badge]: https://img.shields.io/badge/docs-master-blue
[docs-master-url]: https://tower-rs.github.io/tower/tower_test
[mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg
[mit-url]: LICENSE
[actions-badge]: https://github.com/tower-rs/tower/workflows/CI/badge.svg
[actions-url]:https://github.com/tower-rs/tower/actions?query=workflow%3ACI
[discord-badge]: https://img.shields.io/discord/500028886025895936?logo=discord&label=discord&logoColor=white
[discord-url]: https://discord.gg/EeF3cQw

## License

This project is licensed under the [MIT license](LICENSE).

### Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in Tower by you, shall be licensed as MIT, without any additional
terms or conditions.
Loading