()
| 356 | |
| 357 | #[test] |
| 358 | fn remove_by_id() { |
| 359 | let mut dlq = DeadLetterQueue::new(10); |
| 360 | let c = test_constraint(); |
| 361 | let hint = CompensationHint::ManualIntervention { |
| 362 | reason: "test".into(), |
| 363 | }; |
| 364 | |
| 365 | let id1 = dlq |
| 366 | .enqueue(1, 0, 0, vec![], &c, "a".into(), hint.clone()) |
| 367 | .unwrap(); |
| 368 | let _id2 = dlq.enqueue(1, 0, 0, vec![], &c, "b".into(), hint).unwrap(); |
| 369 | |
| 370 | let removed = dlq.remove(id1).unwrap(); |
| 371 | assert_eq!(removed.reason, "a"); |
| 372 | assert_eq!(dlq.len(), 1); |
| 373 | } |
| 374 | } |
nothing calls this directly
no test coverage detected