Skip to content

Commit

Permalink
Revert "Fix never looping loops (#372)" (#373)
Browse files Browse the repository at this point in the history
This reverts commit 755c10e.

This doesn't work.
  • Loading branch information
aaronmondal committed Nov 3, 2023
1 parent 755c10e commit 8e234c5
Showing 1 changed file with 10 additions and 31 deletions.
41 changes: 10 additions & 31 deletions cas/store/tests/filesystem_store_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ use traits::UploadSizeInfo;

use buf_channel::{make_buf_channel_pair, DropCloserReadHalf};
use common::{fs, DigestInfo};
use error::{make_input_err, Code, Error, ResultExt};
use error::{Code, Error, ResultExt};
use filesystem_store::{digest_from_filename, EncodedFilePath, FileEntry, FileEntryImpl, FilesystemStore};
use traits::StoreTrait;

Expand Down Expand Up @@ -308,16 +308,9 @@ mod filesystem_store_tests {
.into_inner();
let mut read_dir_stream = ReadDirStream::new(temp_dir_handle);

while let Some(entry) = read_dir_stream.next().await {
match entry {
Ok(temp_dir_entry) => {
let path = temp_dir_entry.path();
panic!("No files should exist in temp directory, found: {path:?}");
}
Err(e) => {
return Err(make_input_err!("Couldn't read directory entry: {e:?}"));
}
}
while let Some(temp_dir_entry) = read_dir_stream.next().await {
let path = temp_dir_entry?.path();
panic!("No files should exist in temp directory, found: {path:?}");
}

Ok(())
Expand Down Expand Up @@ -417,16 +410,9 @@ mod filesystem_store_tests {
.err_tip(|| "Failed opening temp directory")?
.into_inner();
let mut read_dir_stream = ReadDirStream::new(temp_dir_handle);
while let Some(entry) = read_dir_stream.next().await {
match entry {
Ok(temp_dir_entry) => {
let path = temp_dir_entry.path();
panic!("No files should exist in temp directory, found: {path:?}");
}
Err(e) => {
return Err(make_input_err!("Couldn't read directory entry: {e:?}"));
}
}
while let Some(temp_dir_entry) = read_dir_stream.next().await {
let path = temp_dir_entry?.path();
panic!("No files should exist in temp directory, found: {path:?}");
}
}

Expand Down Expand Up @@ -521,16 +507,9 @@ mod filesystem_store_tests {
.err_tip(|| "Failed opening temp directory")?
.into_inner();
let mut read_dir_stream = ReadDirStream::new(temp_dir_handle);
while let Some(entry) = read_dir_stream.next().await {
match entry {
Ok(temp_dir_entry) => {
let path = temp_dir_entry.path();
panic!("No files should exist in temp directory, found: {path:?}");
}
Err(e) => {
return Err(make_input_err!("Couldn't read directory entry: {e:?}"));
}
}
while let Some(temp_dir_entry) = read_dir_stream.next().await {
let path = temp_dir_entry?.path();
panic!("No files should exist in temp directory, found: {:?}", path);
}
}

Expand Down

0 comments on commit 8e234c5

Please sign in to comment.