Skip to content

Commit

Permalink
refactor: memstore test
Browse files Browse the repository at this point in the history
  • Loading branch information
drmingdrmer committed Aug 23, 2021
1 parent 2566e51 commit eb82266
Showing 1 changed file with 6 additions and 40 deletions.
46 changes: 6 additions & 40 deletions memstore/src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -370,46 +370,12 @@ async fn test_replicate_to_state_machine() -> Result<()> {

fn default_store_with_logs() -> MemStore {
let mut log = BTreeMap::new();
log.insert(1, Entry {
log_id: (1, 1).into(),
payload: EntryPayload::Blank,
});
log.insert(2, Entry {
log_id: (1, 2).into(),
payload: EntryPayload::Blank,
});
log.insert(3, Entry {
log_id: (1, 3).into(),
payload: EntryPayload::Blank,
});
log.insert(4, Entry {
log_id: (1, 4).into(),
payload: EntryPayload::Blank,
});
log.insert(5, Entry {
log_id: (1, 5).into(),
payload: EntryPayload::Blank,
});
log.insert(6, Entry {
log_id: (1, 6).into(),
payload: EntryPayload::Blank,
});
log.insert(7, Entry {
log_id: (1, 7).into(),
payload: EntryPayload::Blank,
});
log.insert(8, Entry {
log_id: (1, 8).into(),
payload: EntryPayload::Blank,
});
log.insert(9, Entry {
log_id: (1, 9).into(),
payload: EntryPayload::Blank,
});
log.insert(10, Entry {
log_id: (1, 10).into(),
payload: EntryPayload::Blank,
});
for i in 1..=10 {
log.insert(i, Entry {
log_id: (1, i).into(),
payload: EntryPayload::Blank,
});
}
let sm = MemStoreStateMachine::default();
let hs = HardState {
current_term: 1,
Expand Down

0 comments on commit eb82266

Please sign in to comment.