Commit Graph

10 Commits

Author SHA1 Message Date
Joseph Doherty
e914b468b6 feat(batch5): implement jetstream error constructors group04 2026-02-28 08:36:38 -05:00
Joseph Doherty
802e3d6576 feat(batch5): implement jetstream error constructors group03 2026-02-28 08:32:48 -05:00
Joseph Doherty
35488a2b68 feat(batch5): implement jetstream error constructors group02 2026-02-28 08:29:20 -05:00
Joseph Doherty
9f30fe6033 feat(batch5): implement jetstream error helpers and group01 constructors 2026-02-28 08:25:56 -05:00
Joseph Doherty
c2a73b49f7 feat(batch2): verify memstore remainder features 2026-02-28 07:17:01 -05:00
Joseph Doherty
a660e38575 Implement deferred WaitQueue, DiskAvailability, and NoOpCache behavior with tests 2026-02-27 09:58:37 -05:00
Joseph Doherty
8849265780 Eliminate PortTracker stub backlog by implementing Raft/file-store/stream/server/client/OCSP stubs and adding coverage. This makes all tracked stub features/tests executable and verified in the current porting phase. 2026-02-27 08:56:26 -05:00
Joseph Doherty
9552f6e7e9 fix(p7-09): move DirectoryStoreTests to Accounts/, add missing PriorityPolicy test case 2026-02-26 20:10:04 -05:00
Joseph Doherty
f0faaffe69 feat(p7-09): JetStream unit tests — versioning (12), dirstore (12), batching/errors deferred (66)
Port session P7-09: add tests from jetstream_versioning_test.go (T:1791–1808),
dirstore_test.go (T:285–296), jetstream_batching_test.go (T:716–744),
jetstream_errors_test.go (T:1381–1384), and accounts_test.go (T:80–110).

- JetStreamVersioningTests: 12 active unit tests + 6 deferred (server-required)
- DirectoryStoreTests: 12 filesystem tests using fake JWTs (no NKeys dependency)
- JetStreamBatchingTests: 29 deferred stubs (all require running JetStream cluster)
- JetStreamErrorsTests: 4 deferred stubs (NewJS* factories not yet ported)
- accounts_test.go T:80–110: 31 deferred (all use RunServerWithConfig)

Fix DirJwtStore.cs expiration bugs:
  - Use DateTimeOffset.UtcNow.UtcTicks (not Unix-relative ticks) for expiry comparison
  - Replace in-place JwtItem mutation with new-object replacement so DrainStale
    can detect stale heap entries via ReferenceEquals check

Add JetStreamVersioning.cs methods: SetStaticStreamMetadata,
SetDynamicStreamMetadata, CopyStreamMetadata, SetStaticConsumerMetadata,
SetDynamicConsumerMetadata, SetDynamicConsumerInfoMetadata, CopyConsumerMetadata.

Tests: 725 pass, 53 skipped/deferred, 0 failures.
DB: +24 complete, +66 deferred.
2026-02-26 20:02:00 -05:00
Joseph Doherty
0950580967 feat(p7-06): port memstore & store interface tests (38 tests)
Add JetStreamMemoryStoreTests (27 tests, T:2023-2056) and
StorageEngineTests (11 tests, T:2943-2957) covering the JetStream
memory store and IStreamStore interface. Fix 10 bugs in MemStore.cs
discovered during test authoring: FirstSeq constructor, Truncate(0)
SubjectTree reset, PurgeEx subject-filtered implementation,
UpdateConfig MaxMsgsPer enforcement, FilteredStateLocked partial
range scan, StoreRawMsgLocked DiscardNewPer, MultiLastSeqs maxSeq
fallback scan + LastNeedsUpdate recalculation, AllLastSeqs
LastNeedsUpdate recalculation, LoadLastLocked LazySubjectState
recalculation, GetSeqFromTime ts==last equality, and timestamp
precision (100-ns throughout). 20 tests deferred (internal fields,
benchmarks, TTL, filestore-only). All 701 unit tests pass.
2026-02-26 19:35:58 -05:00