Skip to content

Commit

Permalink
fix fs buffer-pool tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Sherlock-Holo committed Jul 12, 2024
1 parent a968d29 commit 2b112f3
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions compio-fs/tests/buffer_pool.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
use std::io::{Seek, SeekFrom, Write};

use compio_fs::{pipe, AsyncFd, File};
use compio_io::{AsyncReadAtBufferPool, AsyncReadBufferPool, AsyncWriteExt};
use compio_fs::File;
#[cfg(unix)]
use compio_fs::{pipe, AsyncFd};
use compio_io::AsyncReadAtBufferPool;
#[cfg(unix)]
use compio_io::{AsyncReadBufferPool, AsyncWriteExt};
use compio_runtime::buffer_pool::BufferPool;
use tempfile::NamedTempFile;

Expand All @@ -24,6 +28,7 @@ async fn test_read_file() {
assert_eq!(buf.as_ref(), HELLO);
}

#[cfg(unix)]
#[compio_macros::test]
async fn test_read_async_fd() {
let mut tempfile = tempfile();
Expand All @@ -38,7 +43,7 @@ async fn test_read_async_fd() {
assert_eq!(buf.as_ref(), HELLO);
}

#[cfg(target_family = "unix")]
#[cfg(unix)]
#[compio_macros::test]
async fn test_read_pipe() {
let (mut rx, mut tx) = pipe::anonymous().unwrap();
Expand Down

0 comments on commit 2b112f3

Please sign in to comment.