MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / write_event

Function write_event

nodedb/tests/cdc_arc_fanout.rs:47–68  ·  view source on GitHub ↗
(seq: u64)

Source from the content-addressed store, hash-verified

45}
46
47fn write_event(seq: u64) -> WriteEvent {
48 let payload = serde_json::json!({
49 "id": seq,
50 "padding": "x".repeat(2048),
51 });
52 WriteEvent {
53 sequence: seq,
54 collection: Arc::from("orders"),
55 op: WriteOp::Insert,
56 row_id: RowId::new(format!("r-{seq}")),
57 lsn: Lsn::new(seq * 10),
58 tenant_id: TenantId::new(1),
59 vshard_id: VShardId::new(0),
60 source: EventSource::User,
61 new_value: Some(Arc::from(serde_json::to_vec(&payload).unwrap().as_slice())),
62 old_value: None,
63 system_time_ms: None,
64 valid_time_ms: None,
65 user_id: None,
66 statement_digest: None,
67 }
68}
69
70#[test]
71fn router_fanout_shares_event_allocation_across_streams() {

Calls 1

as_sliceMethod · 0.45

Tested by

no test coverage detected