The record is the text of the repair. The Results table is the last run of the row.
ConnectionClosed: Connection aborted to 127.0.0.1:8086) and 1
failure (testStatusStringWhenRunning).SisServer class>>startUp: makes the server in such an action. On our
VM the first test that sends SisServer current started the server
inside the test. SUnit ends each process that a test started, so the
server stopped at the end of that test, and each later request had no
server. The change of the eval mode is in work (see
../WIP.md).SisServer current is in a test or when one test
runs alone:
SisTest has no setUp, so the tests depend on a server that something
else started.testStatusStringWhenRunning passed on stock Cog only after an earlier
test put a setting into the server. SisServer>>statusString printed
an empty list of settings as #() and a list with entries as {...}.fixes/mumez-pharosmalltalkinteropserver.st):
SisTest>>setUp starts the server when it does not run. The
start is inside DefaultExecutionEnvironment beActiveDuring:, so the
server processes do not belong to the test and SUnit does not end them.statusString prints {} for no settings. The text for a list with
entries is the same as before.Load the package into a Pharo 14 image (build 791) with the load expression of the test run, file in the fixes file of the row if there is one, and run the test classes of the package.
"row 137"
Metacello new baseline: 'PharoSmalltalkInteropServer'; repository: 'github://mumez/PharoSmalltalkInteropServer:main/src'; onConflict: [:e | e useIncoming]; load: #('default').Last result of the package run (stock Cog and iospharo on the same image).
| Row | Label | Load | Stock Cog | iospharo VM |
|---|---|---|---|---|
| 137 | mumez-pharosmalltalkinteropserver | ok | tests=44 P=44 F=0 E=0 S=0 T=0 X=0 | tests=44 P=44 F=0 E=0 S=0 T=0 X=0 |
"mumez/PharoSmalltalkInteropServer: 35 tests error on our VM with 'ConnectionClosed:
Connection aborted to 127.0.0.1:8086' and testStatusStringWhenRunning fails. Stock Cog
passes all 44. No VM defect: the socket plugin, Zinc and Teapot work on our VM when the
server runs (measured).
Cause. The package starts its server (SisServer current) lazily and from the image
startup: SisServer class>>startUp: adds a deferred startup action that creates the
server. The tests (SisTest) send HTTP requests to SisServer current and have no setUp.
Our test runner runs the whole suite inside the startup handler of the image, before the
deferred startup actions run, so the first test that calls SisServer current starts the
server inside the test. SUnit (ProcessMonitorTestService) terminates every process that
a test forks, so the Zinc listener process dies at the end of that test. SisServer current
still answers the stopped server, so every later test gets a refused connection and
testStatusStringWhenRunning sees isRunning=false. Stock Cog runs the suite from a
command line handler that runs after the deferred actions, so the server was started
outside any test and no test terminates its process. The same loss happens on any VM
when the first call of SisServer current is made inside a test.
Repair 1 (package test): SisTest>>setUp makes sure that the server runs, and starts it
again when it does not run. The server starts with DefaultExecutionEnvironment active,
so SUnit does not count the Zinc processes as processes of the test and does not
terminate them. This matters for testRunClassTest and testRunPackageTest too: the
server runs SUnit inside a request, and the cleanup of that nested run terminated the
server processes of the outer test, which closed the connection of the request. The
assertions are unchanged. When the server already runs (Cog) the setUp does nothing.
Repair 2 (package code): testStatusStringWhenRunning only passed when an earlier test
had put a setting into the server. SisServer>>statusString printed the empty list of
settings as 'settings=#()', because an empty Array prints in the literal form, and a
list with entries as 'settings={...}'. The method now prints '{}' for no settings, so the
text has one format in every state. The text for a list with entries is the same as
before, so testStatusStringWhenNotRunning and testPrintOn are unchanged."
add value: #SisTest value: #setUp value: 'running'
value:
'setUp
super setUp.
DefaultExecutionEnvironment beActiveDuring: [
SisServer current isRunning ifFalse: [ SisServer restart ] ]'.
fix value: #SisServer value: #statusString
value: [ :source | source includesSubstring: 'associations printString' ]
value:
'statusString
| associations |
associations := self settings settingsDict associations.
^ ''isRunning={1}, settings={2}'' format: {
self isRunning printString.
associations isEmpty
ifTrue: [ ''{}'' ]
ifFalse: [ associations printString ] }'.
State of 2026-11-20. Made from the test records of the iospharo project (a second Pharo VM). The fixes are proposals for review.