Skip to content

Commit

Permalink
Add slow_tests feature
Browse files Browse the repository at this point in the history
Signed-off-by: Tomasz Pietrek <tomasz@nats.io>
  • Loading branch information
Jarema committed Mar 2, 2023
1 parent e0b1977 commit 3f857b8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
run: |
rustup update
nats-server --jetstream --port=4222 &
cargo test --features=${{ matrix.features }} -- --nocapture
cargo test --features=${{ matrix.features }} --features slow_tests -- --nocapture
check_format:
name: check (format)
Expand Down
1 change: 1 addition & 0 deletions async-nats/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ async-nats = {path = ".", features = ["experimental"]}
service = []
experimental = ["service"]
"server-2.10" = []
slow_tests = []


[[bench]]
Expand Down
4 changes: 3 additions & 1 deletion async-nats/tests/jetstream_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ mod jetstream {
use futures::stream::{StreamExt, TryStreamExt};
use time::OffsetDateTime;
use tokio_retry::Retry;
use tracing::debug;

#[tokio::test]
async fn query_account_requests() {
Expand Down Expand Up @@ -1898,8 +1897,10 @@ mod jetstream {
println!("time elapsed {:?}", now.elapsed());
}

#[cfg(feature = "slow_tests")]
#[tokio::test]
async fn pull_consumer_long_idle() {
use tracing::debug;
let server = nats_server::run_server("tests/configs/jetstream.conf");
let client = ConnectOptions::new()
.event_callback(|err| async move { println!("error: {err:?}") })
Expand Down Expand Up @@ -1951,6 +1952,7 @@ mod jetstream {
messages.next().await.unwrap().unwrap();
}

#[cfg(feature = "slow_tests")]
#[tokio::test]
async fn pull_consumer_stream_with_heartbeat() {
use tracing::debug;
Expand Down

0 comments on commit 3f857b8

Please sign in to comment.