From 150c9f0b77fb0035d68fe974348abffd4a08cc9a Mon Sep 17 00:00:00 2001 From: yuuya uezato Date: Mon, 30 Sep 2019 22:52:41 +0900 Subject: [PATCH] fix tests --- src/storage/journal/ring_buffer.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/storage/journal/ring_buffer.rs b/src/storage/journal/ring_buffer.rs index d8f8e6a..75a2611 100644 --- a/src/storage/journal/ring_buffer.rs +++ b/src/storage/journal/ring_buffer.rs @@ -447,7 +447,7 @@ mod tests { #[test] fn append_and_read_records() -> TestResult { let nvm = MemoryNvm::new(vec![0; 1024]); - let mut ring = JournalRingBuffer::new(nvm, 0, false, &MetricBuilder::new()); + let mut ring = JournalRingBuffer::new(nvm, 0, Default::default(), &MetricBuilder::new()); let records = vec![ record_put("000", 30, 5), @@ -480,7 +480,7 @@ mod tests { #[test] fn read_embedded_data() -> TestResult { let nvm = MemoryNvm::new(vec![0; 1024]); - let mut ring = JournalRingBuffer::new(nvm, 0, false, &MetricBuilder::new()); + let mut ring = JournalRingBuffer::new(nvm, 0, Default::default(), &MetricBuilder::new()); track!(ring.enqueue(&record_put("000", 30, 5)))?; track!(ring.enqueue(&record_delete("111")))?; @@ -498,7 +498,7 @@ mod tests { #[test] fn go_round_ring_buffer() -> TestResult { let nvm = MemoryNvm::new(vec![0; 1024]); - let mut ring = JournalRingBuffer::new(nvm, 512, false, &MetricBuilder::new()); + let mut ring = JournalRingBuffer::new(nvm, 512, Default::default(), &MetricBuilder::new()); assert_eq!(ring.head, 512); assert_eq!(ring.tail, 512); @@ -516,7 +516,7 @@ mod tests { #[test] fn full() -> TestResult { let nvm = MemoryNvm::new(vec![0; 1024]); - let mut ring = JournalRingBuffer::new(nvm, 0, false, &MetricBuilder::new()); + let mut ring = JournalRingBuffer::new(nvm, 0, Default::default(), &MetricBuilder::new()); let record = record_put("000", 1, 2); while ring.tail <= 1024 - record.external_size() as u64 { @@ -547,7 +547,7 @@ mod tests { #[test] fn too_large_record() { let nvm = MemoryNvm::new(vec![0; 1024]); - let mut ring = JournalRingBuffer::new(nvm, 0, false, &MetricBuilder::new()); + let mut ring = JournalRingBuffer::new(nvm, 0, Default::default(), &MetricBuilder::new()); let record = record_embed("000", &vec![0; 997]); assert_eq!(record.external_size(), 1020);