blob: 90362d659f4c3360baeddaef45e11fb79b0d8f0b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
### ✅ **Basic Functional Verifications**
1. **Source Trigger Verification**
* Log a message every time `MockStreamingSource` generates a telemetry.
* Count how many times `TelemetryAvailable` was raised vs. published.
2. **Destination Receipt Check**
* Confirm each destination receives telemetry that matches the `ToPayload()` value.
* Add internal counters per destination to confirm delivery.
3. **Package Identity Tracking**
* Assign a unique ID to each telemetry object and verify that:
* It travels all the way to the destination.
* It is not duplicated or lost.
---
### 🔁 **Retry and Backoff Testing**
4. **Destination Retry Logic**
* Simulate a failure in `MockDestination.Publish()` every Nth call.
* Verify that retries are scheduled with exponential backoff.
5. **Pending Storage Write/Read**
* Cause all destinations to fail.
* Confirm that telemetry is persisted to `TelemetryLiteDBStorageManager`.
* Manually inspect `PendingTelemetries.Count` after the run.
---
### 🕒 **Time & Latency Metrics**
6. **Elapsed Time Per Publish**
* Log how long it takes from package creation to successful publish.
7. **Latency Bucketing**
* Track telemetry latency buckets (e.g., `<1s`, `1–5s`, `>5s`) and print histogram.
---
### 📦 **Historical and Pending Telemetry**
8. **History Source Verification**
* Confirm `MockHistorySource.RequestHistory()` is triggered periodically.
* Verify telemetry from it is published and updated in checkpoints.
9. **Checkpoint Verification**
* Track when and how often checkpoints are updated.
* Ensure they persist across runs using `TelemetryLiteDBStorageManager`.
---
### 🛠️ **Fault Injection and Resilience**
10. **Out-of-Order Timestamps**
* Send telemetry with past/future timestamps and check ordering in publish results.
11. **Multiple Concurrent Sources**
* Add 2–3 `MockStreamingSource` instances and confirm the system handles interleaved input.
12. **Slow Publisher Simulation**
* Simulate slow or blocking destination publish methods.
* Confirm queue doesn’t overflow and telemetry is not lost.
---
### 🧪 **Extended Diagnostic Reporting**
13. **Final Report Enhancements**
* Total telemetry generated, published, failed, retried, and persisted.
* Telemetry per source/destination.
* Count of `TelemetryAvailable` vs `Publish()`.
---
Would you like to start with a few of these now? I can help you implement fault injection, persistence inspection, or anything else you choose.
|