tst_grpc_client_end2end: deflake channelChangeCancelsInFlightRPCs


Fixed delays (150 ms singleShot, 25 ms qWait) made the cancel race
unreliable on loaded CI: the channel could swap before the server
accepted the RPC, downgrading the "Active" row to a pre-accept cancel.
attachChannel() can also emit finished() synchronously, which
finishedSpy.wait() misses.

Sync on a server-side requestReceived flag and poll the spy count
instead, and carry channelOptions() over to the new channel so SSL and
other transport options survive the swap.

Fix the data race for the previously non-atomic `notifyWhenDone`, which
gets written from the grpc completion-queue thread and read from the
main test thread via QTRY_COMPARE_EQ_WITH_TIMEOUT.

Pick-to: 6.11 6.8
Change-Id: I604c669e15fb1a436cb28bf653c955a4ffddbcae
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
commite9fedebea7da7c921d56c0e2f07235bc7a6f2bc5
parent7cb07deace889f88daf42ee945a8aecb185390e8
authorDennis Oberst <dennis.oberst@qt.io>
committerDennis Oberst <dennis.oberst@qt.io>
commit timeMon, 1 Jun 2026 14:55:13 +0000