JFJochIntegrationTest_GPUStills_cancel_during_prepass: the frames are held for the pre-pass until the cancel

With the mock the generator's 30 frames arrive at once and the run was over before the cancel. The
case now gives the card fewer frames than the pre-pass waits for and no final packet, so the frames
stay held, whatever the card's speed.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UqXYdHHZ4cogS1mrGUtfN7
This commit is contained in:
leonarski_fandClaude Fable 5.1 committed 2026-11-17 14:56:17 +01:00
1 parent c40bebca98
commit cebc677eb9
1 file changed
+7 -3
+7 -3
View File
@@ -254,9 +254,10 @@ TEST_CASE("JFJochIntegrationTest_GPUStills_cancel_during_prepass", "[JFJochRecei
// A cancel while the frames are held for the pre-pass ends the collection.
Logger logger(Catch::getResultCapture().getCurrentTestName());
// Fewer frames arrive than the pre-pass waits for, and no final packet: the frames stay held until the cancel.
// How long the stop takes is not checked.
DiffractionExperiment experiment(DetJF4M());
experiment.ImagesPerTrigger(30).NumTriggers(1).UseInternalPacketGenerator(true)
experiment.ImagesPerTrigger(30).NumTriggers(1).UseInternalPacketGenerator(false)
.FilePrefix("gpu_stills_cancel").JungfrauConvPhotonCnt(false)
.DetectorDistance_mm(75).BeamY_pxl(1136).BeamX_pxl(1090).IncidentEnergy_keV(12.4)
.SetUnitCell(UnitCell{.a = 36.9, .b = 78.95, .c = 78.95, .alpha =90, .beta = 90, .gamma = 90});
@@ -264,7 +265,10 @@ TEST_CASE("JFJochIntegrationTest_GPUStills_cancel_during_prepass", "[JFJochRecei
PixelMask pixel_mask(experiment);
AcquisitionDeviceGroup aq_devices;
aq_devices.Add(std::make_unique<MockAcquisitionDevice>(0, 64));
auto test = std::make_unique<MockAcquisitionDevice>(0, 64);
for (int m = 0; m < experiment.GetModulesNum(); m++)
test->CreateJFPackets(experiment, 1, 10, m, nullptr);
aq_devices.Add(std::move(test));
NonePusher pusher;
JFJochReceiverService service(aq_devices, logger, pusher);
@@ -273,7 +277,7 @@ TEST_CASE("JFJochIntegrationTest_GPUStills_cancel_during_prepass", "[JFJochRecei
service.RugnuxLive(true, nullptr, 4, 60);
service.Start(experiment, pixel_mask, nullptr);
std::this_thread::sleep_for(std::chrono::seconds(10));
std::this_thread::sleep_for(std::chrono::seconds(3));
const auto t0 = std::chrono::steady_clock::now();
service.Cancel(false);
JFJochReceiverOutput receiver_out;