Skip to content

Commit

Permalink
use defaults for Filesystem store
Browse files Browse the repository at this point in the history
  • Loading branch information
mkeen committed Dec 29, 2024
1 parent 9adeef3 commit 0022bdf
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions nativelink-service/tests/ac_server_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use std::sync::Arc;

use bytes::BytesMut;
use maplit::hashmap;
use nativelink_config::stores::{EvictionPolicy, FilesystemSpec, MemorySpec, StoreSpec};
use nativelink_config::stores::{FilesystemSpec, MemorySpec, StoreSpec};
use nativelink_error::Error;
use nativelink_macro::nativelink_test;
use nativelink_proto::build::bazel::remote::execution::v2::action_cache_server::ActionCache;
Expand Down Expand Up @@ -49,6 +49,7 @@ async fn insert_into_store<T: Message>(
let data_len = store_data.len();
let digest = DigestInfo::try_new(hash, action_size)?;
store.update_oneshot(digest, store_data.freeze()).await?;

Ok(data_len.try_into().unwrap())
}

Expand All @@ -64,6 +65,8 @@ async fn make_store_manager() -> Result<Arc<StoreManager>, Error> {

let current_dir = env::current_dir().expect("Failed to get current directory");

let default_filesystem_spec = FilesystemSpec::default();

make_and_add_store_to_manager(
"main_ac",
&StoreSpec::filesystem(FilesystemSpec {
Expand All @@ -77,14 +80,9 @@ async fn make_store_manager() -> Result<Arc<StoreManager>, Error> {
.into_os_string()
.into_string()
.unwrap(),
read_buffer_size: 100,
block_size: 100,
eviction_policy: Some(EvictionPolicy {
max_bytes: 1_000_000_000,
evict_bytes: 10000,
max_seconds: 500,
max_count: 1_000_000,
}),
read_buffer_size: default_filesystem_spec.read_buffer_size,
eviction_policy: default_filesystem_spec.eviction_policy,
block_size: default_filesystem_spec.block_size,
}),
&store_manager,
None,
Expand Down

0 comments on commit 0022bdf

Please sign in to comment.