Skip to content

Commit

Permalink
Fix tests behind feature flags
Browse files Browse the repository at this point in the history
  • Loading branch information
n1ghtmare committed Jul 21, 2023
1 parent f60095f commit 86f0d81
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion async-nats/examples/pub.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use async_nats::{connect, Error, Subject};
use bytes::Bytes;
use std::time::Instant;
use async_nats::{Subject, Error, connect};

#[tokio::main]
async fn main() -> Result<(), Error> {
Expand Down
6 changes: 4 additions & 2 deletions async-nats/tests/jetstream_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ mod jetstream {
use async_nats::jetstream::stream::{self, DiscardPolicy, StorageType};
use async_nats::jetstream::AckKind;
use async_nats::ConnectOptions;
#[cfg(feature = "slow_tests")]
use bytes::Bytes;
use futures::stream::{StreamExt, TryStreamExt};
use time::OffsetDateTime;
use tokio_retry::Retry;
Expand Down Expand Up @@ -2990,7 +2992,7 @@ mod jetstream {

while let Some((i, message)) = stream.next().await {
let message = message.unwrap();
assert_eq!(from_utf8(&message.payload).unwrap(), i.into());
assert_eq!(from_utf8(&message.payload).unwrap(), i.to_string());
}
}

Expand Down Expand Up @@ -3186,7 +3188,7 @@ mod jetstream {
let mut messages = consumer.messages().await.unwrap().take(1000);
let message = messages.next().await.unwrap().unwrap();

assert_eq!(message.subject, "fromtest.transformed.test");
assert_eq!(message.subject.as_str(), "fromtest.transformed.test");
}

#[tokio::test]
Expand Down

0 comments on commit 86f0d81

Please sign in to comment.