Skip to content

Commit

Permalink
Various docs fixes prior to 0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
palfrey committed Aug 10, 2022
1 parent 1b00867 commit c03f1da
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 15 deletions.
7 changes: 1 addition & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,11 @@ You can then either add `#[serial]` or `#[serial(some_text)]` to tests as requir

For each test, a timeout can be specified with the `timeout_ms` parameter to the [serial](macro@serial) attribute. Note that
the timeout is counted from the first invocation of the test, not from the time the previous test was completed. This can
lead to some unpredictable behavior based on the number of parallel tests run on the system.
lead to [some unpredictable behavior](https://github.com/palfrey/serial_test/issues/76) based on the number of parallel tests run on the system.
```rust
#[test]
#[serial(timeout_ms = 1000)]
fn test_serial_one() {
// Do things
}
#[test]
#[serial(test_name, timeout_ms = 1000)]
fn test_serial_another() {
// Do things
}
```
4 changes: 2 additions & 2 deletions serial_test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ default = ["logging", "async"]
## Switches on debug logging (and requires the `log` package)
logging = ["log"]

## Enables async features
## Enables async features (and requires the `futures` package)
async = ["futures"]

## The file_locks feature unlocks the `file_serial`/`file_parallel` macros
## The file_locks feature unlocks the `file_serial`/`file_parallel` macros (and requires the `fslock` package)
file_locks = ["fslock"]

docsrs = ["document-features"]
Expand Down
12 changes: 12 additions & 0 deletions serial_test/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,18 @@
//! // Do things
//! }
//! ````
//!
//!
//! For each test, a timeout can be specified with the `timeout_ms` parameter to the [serial](macro@serial) attribute. Note that
//! the timeout is counted from the first invocation of the test, not from the time the previous test was completed. This can
//! lead to [some unpredictable behavior](https://github.com/palfrey/serial_test/issues/76) based on the number of parallel tests run on the system.
//! ```rust
//! #[test]
//! #[serial(timeout_ms = 1000)]
//! fn test_serial_one() {
//! // Do things
//! }
//! ```
//!
//! ## Feature flags
#![cfg_attr(
Expand Down
8 changes: 1 addition & 7 deletions serial_test_derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,20 +64,14 @@ use std::ops::Deref;
///
/// For each test, a timeout can be specified with the `timeout_ms` parameter to the [serial](macro@serial) attribute. Note that
/// the timeout is counted from the first invocation of the test, not from the time the previous test was completed. This can
/// lead to some unpredictable behavior based on the number of parallel tests run on the system.
/// lead to [some unpredictable behavior](https://github.com/palfrey/serial_test/issues/76) based on the number of parallel tests run on the system.
///
/// ````
/// #[test]
/// #[serial(timeout_ms = 1000)]
/// fn test_serial_one() {
/// // Do things
/// }
///
/// #[test]
/// #[serial(timeout_ms = 1000)]
/// fn test_serial_another() {
/// // Do things
/// }
/// ````
///
/// Nested serialised tests (i.e. a [serial](macro@serial) tagged test calling another) are supported
Expand Down

0 comments on commit c03f1da

Please sign in to comment.