Markdown OKF-Schema Studio

Behaviour SwRS-MDOKFSTUDIO-DIAG-097

A JAR render is bounded in input, output, time and process lifetime

When a JAR render meets a bound on the diagram text, the output, the error text or the run time, or is cancelled, the extension SHALL end it with a message on the diagram, kill the whole PlantUML process group where it started one, keep at most the first 64 KiB of error text followed by the note [stderr truncated at 64 KiB], and settle the render exactly once without raising an uncaught exception in the extension host.

Another outcome at step 2 of path 1 in StRS-MDOKFSTUDIO-DIAG-007, in the state “The JAR pipeline is selected”.

Scenarios 8

The situations the tests check; open one to read it.

boundaryError text is capped at 64 KiB
InputOutcome
a failing process that writes more than 64 KiB to its error outputthe message holds at most the first 64 KiB of error text followed by [stderr truncated at 64 KiB]
a failing process with a short error outputthe whole text is shown with no note
boundaryThe diagram text is limited to 1 MiB
InputOutcome
a diagram text of 1,048,577 characters with useJar onthe diagram shows PlantUML source exceeds the 1 MiB preview limit. with state error and no process starts
a diagram text of exactly 1,048,576 charactersthe process is started
boundaryThe output is limited to 8 MiB
InputOutcome
a process that writes more than 8 MiB to its standard outputthe process is killed and the diagram shows PlantUML SVG output exceeds the 8 MiB preview limit. with state error
a process whose output is exactly 8 MiBthe output is accepted
refusalA render stops after 30 seconds
Givena process that never answers
When30 seconds pass
Thenthe whole process group is killed and the diagram shows PlantUML did not finish within 30 s. with state error
a process that answers in time ends with its timer cleared and no timeout message
nominalCancelling a render stops the process group
Givena running PlantUML process on POSIX and a render cancelled by a newer render stage or the closing of the preview
Whenthe render is cancelled
ThenSIGTERM goes to the whole process group, falling back to the direct child, and the diagram reports PlantUML rendering was canceled.
a process that has already exited receives no signal
refusalA render already cancelled starts no process
Givena render whose abort signal is already set
Whenthe render starts
Thenno process is started and PlantUML rendering was canceled. is reported
an abort signal that fires after the render has settled changes nothing
refusalA process that ignores its input becomes a message
Givena process that exits before reading its input, or a standard input that emits an error
Whenthe diagram is rendered
Thenthe diagram shows a failure message, the render ends with a diagnostic and the host raises no uncaught exception
boundaryA render settles exactly once
Giventhe close, error and timeout events of one process firing in the same tick
Whenthe events are handled
Thenthe render has one result and the later events are ignored

Implemented in 1

Tested by 4

Known limits (2)

Replaces

SwRS-MDOKFSTUDIO-DIAG-098The JAR pipeline refuses a source over 1 MiB superseded superseded by SwRS-MDOKFSTUDIO-DIAG-097 Markdown file
SwRS-MDOKFSTUDIO-DIAG-099The JAR pipeline stops an output over 8 MiB superseded superseded by SwRS-MDOKFSTUDIO-DIAG-097 Markdown file
SwRS-MDOKFSTUDIO-DIAG-100A JAR render stops after 30 seconds superseded superseded by SwRS-MDOKFSTUDIO-DIAG-097 Markdown file
SwRS-MDOKFSTUDIO-DIAG-101Cancelling a render stops the PlantUML process group superseded superseded by SwRS-MDOKFSTUDIO-DIAG-097 Markdown file
SwRS-MDOKFSTUDIO-DIAG-102A process that ignores its input becomes a message superseded superseded by SwRS-MDOKFSTUDIO-DIAG-097 Markdown file
SwRS-MDOKFSTUDIO-DIAG-103A render settles exactly once superseded superseded by SwRS-MDOKFSTUDIO-DIAG-097 Markdown file
SwRS-MDOKFSTUDIO-DIAG-118A cancelled JAR render reports the cancellation superseded superseded by SwRS-MDOKFSTUDIO-DIAG-097 Markdown file