Bug 360899

Summary: ItemViewsPuzzleTest test hangs
Product: [Unmaintained] bindings Reporter: Petr Pisar <ppisar>
Component: generalAssignee: kde-bindings
Status: RESOLVED FIXED    
Severity: normal CC: chrisburel
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Petr Pisar 2016-03-23 12:12:55 UTC
Running tests perlqt-4.14.3 hangs on ItemViewsPuzzleTest test for me. Running the test manually looks like:

$ xvfb-run -a perl -I/home/test/fedora/perl-Qt/perlqt-4.14.3/build/blib/{arch,lib} "/home/test/fedora/perl-Qt/perlqt-4.14.3/qtgui/t/itemviewspuzzle.t" 
Useless use of left bitshift (<<) in void context at PiecesModel.pm line 117.
1..1
********* Start testing of ItemViewsPuzzleTest *********
Config: Using QTest library 4.8.7, Qt 4.8.7
ok 1 - Window shown
PASS   : ItemViewsPuzzleTest::initTestCase()

Here it hangs, the processor idles then.
Comment 1 Chris Burel 2016-10-03 18:21:05 UTC
Fixed in 8f066267.  The problem is that the itemviews/puzzle example uses the QMessageBox::information() function, which runs its own event loop in its own thread.  The testing framework has no way to detect that this thread has started, so user interaction is required for the test to complete.  My solution is to just monkey patch QMessageBox::information during the test, so that we ensure that it is called when the puzzle is complete, but no additional event loops are created.

http://commits.kde.org/perlqt/8f066267118c66e01d45b60ba086510d577fa854