loro/crates/fuzz/examples/oom.rs
Zixuan Chen 23a99f53c9
Test fuzz oom (#508)
* test: avoid fuzz oom

* fix: get pending dag node err
2024-10-12 00:49:23 +08:00

256 lines
8.8 KiB
Rust

use fuzz::{
actions::{ActionWrapper::*, GenericAction},
crdt_fuzzer::{Action::*, FuzzValue::*},
test_multi_sites_on_one_doc,
};
use loro::ContainerType::*;
pub fn main() {
test_multi_sites_on_one_doc(
5,
&mut [
Handle {
site: 1,
target: 0,
container: 0,
action: Generic(GenericAction {
value: I32(53423135),
bool: true,
key: 3271672771,
pos: 72391498414670731,
length: 2534382878240390,
prop: 12587145347420061696,
}),
},
Handle {
site: 0,
target: 0,
container: 0,
action: Generic(GenericAction {
value: Container(Tree),
bool: true,
key: 2248212783,
pos: 10886371984050945,
length: 3393509701437167640,
prop: 2821266740684986392,
}),
},
Handle {
site: 39,
target: 39,
container: 126,
action: Generic(GenericAction {
value: I32(-132),
bool: true,
key: 4281597952,
pos: 9899933171711,
length: 2821266740684990247,
prop: 2821266740684990247,
}),
},
SyncAll,
Sync { from: 191, to: 195 },
Checkout {
site: 1,
to: 783189505,
},
Handle {
site: 195,
target: 195,
container: 195,
action: Generic(GenericAction {
value: I32(842347833),
bool: false,
key: 3351758643,
pos: 13382947428572317639,
length: 14395678941249124793,
prop: 13386888078246266823,
}),
},
Sync { from: 185, to: 185 },
Sync { from: 185, to: 185 },
Sync { from: 185, to: 185 },
Sync { from: 185, to: 185 },
Sync { from: 185, to: 199 },
Sync { from: 199, to: 199 },
Sync { from: 185, to: 185 },
Sync { from: 185, to: 185 },
Sync { from: 52, to: 56 },
Sync { from: 185, to: 185 },
Sync { from: 185, to: 185 },
Sync { from: 199, to: 199 },
Sync { from: 199, to: 199 },
Checkout {
site: 199,
to: 3351758791,
},
Sync { from: 81, to: 199 },
Sync { from: 54, to: 57 },
Sync { from: 185, to: 185 },
Sync { from: 185, to: 185 },
Sync { from: 185, to: 185 },
Sync { from: 185, to: 185 },
Sync { from: 185, to: 185 },
Sync { from: 185, to: 185 },
Sync { from: 185, to: 185 },
Sync { from: 185, to: 185 },
Sync { from: 199, to: 199 },
Sync { from: 185, to: 185 },
Sync { from: 185, to: 185 },
Sync { from: 199, to: 199 },
Sync { from: 199, to: 199 },
Checkout {
site: 199,
to: 3351758791,
},
Sync { from: 81, to: 199 },
Sync { from: 54, to: 57 },
Sync { from: 199, to: 199 },
Sync { from: 199, to: 199 },
Sync { from: 185, to: 185 },
Sync { from: 185, to: 185 },
Sync { from: 185, to: 185 },
Sync { from: 185, to: 185 },
Sync { from: 199, to: 199 },
Sync { from: 185, to: 185 },
Sync { from: 185, to: 185 },
Sync { from: 185, to: 185 },
Sync { from: 185, to: 185 },
Sync { from: 185, to: 185 },
Sync { from: 199, to: 199 },
Sync { from: 199, to: 199 },
Sync { from: 199, to: 185 },
Sync { from: 185, to: 185 },
Sync { from: 185, to: 185 },
Sync { from: 185, to: 185 },
Sync { from: 185, to: 199 },
Sync { from: 199, to: 199 },
Sync { from: 185, to: 185 },
Sync { from: 199, to: 185 },
Sync { from: 185, to: 185 },
Sync { from: 185, to: 185 },
Sync { from: 185, to: 185 },
Sync { from: 185, to: 185 },
Sync { from: 185, to: 199 },
Sync { from: 199, to: 199 },
Sync { from: 185, to: 185 },
Sync { from: 185, to: 185 },
Sync { from: 52, to: 56 },
Sync { from: 185, to: 185 },
Sync { from: 185, to: 185 },
Sync { from: 199, to: 199 },
Sync { from: 199, to: 199 },
Checkout {
site: 199,
to: 3351758791,
},
Sync { from: 81, to: 199 },
Sync { from: 54, to: 57 },
Sync { from: 185, to: 185 },
Sync { from: 185, to: 185 },
Sync { from: 185, to: 185 },
Sync { from: 185, to: 185 },
Sync { from: 185, to: 185 },
Sync { from: 185, to: 185 },
Sync { from: 185, to: 185 },
Sync { from: 185, to: 185 },
Sync { from: 199, to: 199 },
Sync { from: 185, to: 185 },
Sync { from: 185, to: 185 },
Sync { from: 199, to: 199 },
Sync { from: 199, to: 199 },
Checkout {
site: 199,
to: 3351758791,
},
Sync { from: 81, to: 199 },
Sync { from: 54, to: 57 },
Sync { from: 199, to: 199 },
Sync { from: 199, to: 199 },
Sync { from: 185, to: 185 },
Sync { from: 185, to: 185 },
Sync { from: 185, to: 185 },
Sync { from: 185, to: 185 },
Sync { from: 185, to: 185 },
Sync { from: 185, to: 185 },
Sync { from: 199, to: 199 },
Sync { from: 185, to: 185 },
Checkout {
site: 185,
to: 3115956665,
},
Checkout {
site: 185,
to: 3115956665,
},
Sync { from: 185, to: 185 },
Sync { from: 185, to: 199 },
Sync { from: 199, to: 199 },
Sync { from: 52, to: 53 },
Sync { from: 199, to: 199 },
Sync { from: 199, to: 199 },
Checkout {
site: 199,
to: 3351758791,
},
Sync { from: 185, to: 185 },
Sync { from: 185, to: 185 },
Sync { from: 185, to: 185 },
Sync { from: 185, to: 185 },
Sync { from: 185, to: 185 },
Sync { from: 185, to: 185 },
Sync { from: 185, to: 185 },
Sync { from: 199, to: 199 },
Sync { from: 199, to: 199 },
Sync { from: 185, to: 185 },
Sync { from: 185, to: 199 },
Sync { from: 199, to: 199 },
Sync { from: 52, to: 53 },
Sync { from: 199, to: 199 },
Sync { from: 199, to: 199 },
Checkout {
site: 199,
to: 3351758791,
},
Sync { from: 199, to: 199 },
Sync { from: 185, to: 185 },
Sync { from: 185, to: 185 },
Sync { from: 185, to: 185 },
Sync { from: 185, to: 185 },
Sync { from: 199, to: 199 },
Sync { from: 199, to: 185 },
Sync { from: 185, to: 185 },
Sync { from: 185, to: 185 },
Sync { from: 185, to: 185 },
Sync { from: 185, to: 185 },
Sync { from: 185, to: 199 },
Sync { from: 199, to: 199 },
Sync { from: 199, to: 199 },
Checkout {
site: 199,
to: 3351758791,
},
Sync { from: 185, to: 185 },
Sync { from: 185, to: 185 },
Handle {
site: 3,
target: 3,
container: 3,
action: Generic(GenericAction {
value: I32(50529027),
bool: true,
key: 50529027,
pos: 217020518514230019,
length: 217020518514230019,
prop: 217020518514230019,
}),
},
Sync { from: 185, to: 185 },
Sync { from: 199, to: 199 },
Sync { from: 199, to: 199 },
Sync { from: 199, to: 199 },
Sync { from: 199, to: 199 },
Sync { from: 199, to: 199 },
],
);
}