Storage, rework and limit-analysis tests add Claude events with fixed 2026-10-14 timestamps to a HistoryStore on the system clock. The 60-day Claude retention would drop them from mid-December 2026 on, so these stores now use TestClock. Refs #11
This commit is contained in:
@@ -90,11 +90,11 @@ public class ReworkTests
|
||||
using var directory = new TestDirectory();
|
||||
var source = directory.Write("claude/projects/p/a.jsonl", Fixtures.Claude());
|
||||
var log = new DiagnosticLog();
|
||||
var store = new HistoryStore(directory.Path, log);
|
||||
var store = new HistoryStore(directory.Path, log, new TestClock());
|
||||
var scanner = new IncrementalScanner(store, log, Path.Combine(directory.Path, "claude"), directory.Path);
|
||||
Assert.Equal(1, (await scanner.ScanAsync(TestContext.Current.CancellationToken)).AddedEvents);
|
||||
await store.SaveAsync(TestContext.Current.CancellationToken);
|
||||
store = new(directory.Path, log);
|
||||
store = new(directory.Path, log, new TestClock());
|
||||
scanner = new(store, log, Path.Combine(directory.Path, "claude"), directory.Path);
|
||||
using var exclusive = new FileStream(source, FileMode.Open, FileAccess.Read, FileShare.None);
|
||||
Assert.Equal(0, (await scanner.ScanAsync(TestContext.Current.CancellationToken)).AddedEvents);
|
||||
|
||||
Reference in New Issue
Block a user