The download-pacing tests that arrived with the runtime seam call the
runtime through the fixture; the harness now forwards that one member.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: James Maes <james@kof22.com>
Tests declared the store by the product type's name in 104 lines of
25 files, so the step that renames that type would have edited all of
them. TestState.cs now declares the alias JournalStore, and every test
and fixture uses it. The product type's name appears in the test
project only in TestState.cs.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: James Maes <james@kof22.com>
With no queue named, a job that names no printer compared equal to
the unset switch and was held. The switch is now compared only when
set, with a test. The test of the held queue reads the submission and
print counts instead of the entry signal, which either queue raises,
and says that it drives the printer directly.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: James Maes <james@kof22.com>
The first test of two servers checked the second's queue after the
first's only job had been claimed, so it passed with a shared queue.
The queues are now compared while the job is still queued, and the
tests go on to what a fixture with several servers leans on: each
server's claimed job, its acknowledged connection, a hold and a
refusal set on one, and closing one while the other answers.
The HTTP handler now refuses and counts a request addressed to another
server's origin, so a session built on the wrong server's handler
shows at once. The private fields of the server and its connection
get their summaries.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: James Maes <james@kof22.com>
The harness said its pipe is never the installed service's, but a
caller could pass that name. The constructor now refuses it, in any
letter case, before the runtime is built, and a test shows it. The
harness's private field gets its summary.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: James Maes <james@kof22.com>
A direct test of the fake: with BlockPrinter set, a submission to the
named queue stays inside the printer, a later submission to the other
queue finishes, and the held one finishes only when released.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: James Maes <james@kof22.com>
The summary placed both at the end of the file; the constants are at
the top.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: James Maes <james@kof22.com>
The section on testing the service runtime now names the three test
helpers a new test goes through: SingleServerHarness for the runtime,
ScriptedPrintServer for the server, and TestState for a store or a
connection of the test's own to a journal, which must be unpooled.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: James Maes <james@kof22.com>
BlockPrinter names a printer whose submissions stay inside the fake
until they are released, while submissions to the other queue pass
through. BlockPrint, which holds everything, is unchanged. No test
uses the new switch yet; the tests of claiming for an idle printer
while another is busy need it.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: James Maes <james@kof22.com>
Six places in five test files opened their own SQLite connection to a
journal, to seed rows or to damage the schema. Those connections used
the same pool as the stores on that journal without taking the
journal's schema lock, so the pool race the store's lock closes was
still open to them. TestState.OpenJournal opens such a connection with
pooling off, and each of those places now gets its connection there.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: James Maes <james@kof22.com>
TestState.OpenStore is now the only place the test project constructs
AgentStore: 101 constructions in 24 files become calls to it, and the
store's static lock and connection-string lookups are read through it
too. Tests still declare the store by its type, because the build
refuses var where the type is not apparent. When the store is opened
for one server out of a registry, the constructor call changes in one
file.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: James Maes <james@kof22.com>
SingleServerHarness wraps the runtime for the one-server case and is
now the only test type that names AgentRuntime: the fixtures build it,
tests hold it, and the constants and pure functions tests read from
the runtime class are read from it. It makes the management pipe
itself, so the tests that built a pipe by hand, or wrote a command to
it by hand, ask the harness instead. When the runtime becomes a host
with one connection per server, this file changes and the tests do not.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: James Maes <james@kof22.com>
The realtime peer, the HTTP handler, the job queue and the accepted
connections become ScriptedPrintServer, which knows nothing about the
runtime it answers. RealtimeRuntimeFixture keeps one and passes through
the members tests use, so a later fixture can put several servers
behind one service. Tests name the connection type by its new home;
nothing else in them changes. One new test shows two servers share no
state.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: James Maes <james@kof22.com>