Re: purpose unittest (AlternativesModelTest::runJobTest) fails randomly

2018-08-11 Thread Aleix Pol
On Thu, Aug 9, 2018 at 11:37 AM David Faure  wrote:
>
> On lundi 6 août 2018 10:52:52 CEST Ben Cooksley wrote:
> > On Mon, Aug 6, 2018 at 7:27 PM, David Faure  wrote:
> > > On lundi 6 août 2018 01:18:44 CEST Aleix Pol wrote:
> > >> On Sat, Aug 4, 2018 at 12:31 PM David Faure  wrote:
> > >> > Any idea about this test that fails sometimes? Timing issue? The wait()
> > >> > should be longer in case of slow network?
> > >> >
> > >> > https://build.kde.org/view/Frameworks/job/Frameworks%20purpose%20kf5-qt
> > >> > 5%2
> > >> > 0SUSEQt5.10/92/testReport/junit/(root)/TestSuite/alternativesmodeltest/
> > >>
> > >> Hi,
> > >> Yes, I looked into fixing it, it seemed like it was but then it wasn't
> > >> (yay randomness!).
> > >>
> > >> My guess is that it's because kf5.kio.core.copyjob prints the whole
> > >> URL which in this case it's a data one (which I tried to fix in
> > >> 64492796aa7ca4b63dbae419f47e14da15fbcc51). I failed because it still
> > >> prints I added "+
> > >> QLoggingCategory::setFilterRules(QStringLiteral("kf5.kio.core.copyjob=fal
> > >> se" ));" I'm not sure why this has the effect I hoped it would. Any
> > >> ideas?>
> > > If $QT_LOGGING_RULES is set to something like '*.debug=true" then this
> > > overrides anything you do programmatically with setFilterRules.
> > >
> > > I'm not sure if that's what the CI does, though?
> >
> > The CI sets QT_LOGGING_RULES exactly as you describe :)
> > This is done at
> > https://cgit.kde.org/sysadmin/ci-tooling.git/tree/helpers/run-tests.py#n79
>
> Thanks Ben, so that confirms it.
>
> I have now pushed
> https://commits.kde.org/purpose/c480fa214b50efbb85c2e4830961b0514792426c
> in order to successfully turn off copyjob debug output even when
> QT_LOGGING_RULES is set to enable everything.
>
> The test has passed 3 times in a row, so you were right, Aleix, that was
> indeed the issue strange that it would lead to failure, not just truncated
> test output ;)

\o/

Thank you David!
Aleix


Re: purpose unittest (AlternativesModelTest::runJobTest) fails randomly

2018-08-09 Thread David Faure
On lundi 6 août 2018 10:52:52 CEST Ben Cooksley wrote:
> On Mon, Aug 6, 2018 at 7:27 PM, David Faure  wrote:
> > On lundi 6 août 2018 01:18:44 CEST Aleix Pol wrote:
> >> On Sat, Aug 4, 2018 at 12:31 PM David Faure  wrote:
> >> > Any idea about this test that fails sometimes? Timing issue? The wait()
> >> > should be longer in case of slow network?
> >> > 
> >> > https://build.kde.org/view/Frameworks/job/Frameworks%20purpose%20kf5-qt
> >> > 5%2
> >> > 0SUSEQt5.10/92/testReport/junit/(root)/TestSuite/alternativesmodeltest/
> >> 
> >> Hi,
> >> Yes, I looked into fixing it, it seemed like it was but then it wasn't
> >> (yay randomness!).
> >> 
> >> My guess is that it's because kf5.kio.core.copyjob prints the whole
> >> URL which in this case it's a data one (which I tried to fix in
> >> 64492796aa7ca4b63dbae419f47e14da15fbcc51). I failed because it still
> >> prints I added "+
> >> QLoggingCategory::setFilterRules(QStringLiteral("kf5.kio.core.copyjob=fal
> >> se" ));" I'm not sure why this has the effect I hoped it would. Any
> >> ideas?> 
> > If $QT_LOGGING_RULES is set to something like '*.debug=true" then this
> > overrides anything you do programmatically with setFilterRules.
> > 
> > I'm not sure if that's what the CI does, though?
> 
> The CI sets QT_LOGGING_RULES exactly as you describe :)
> This is done at
> https://cgit.kde.org/sysadmin/ci-tooling.git/tree/helpers/run-tests.py#n79

Thanks Ben, so that confirms it.

I have now pushed 
https://commits.kde.org/purpose/c480fa214b50efbb85c2e4830961b0514792426c
in order to successfully turn off copyjob debug output even when 
QT_LOGGING_RULES is set to enable everything.

The test has passed 3 times in a row, so you were right, Aleix, that was 
indeed the issue strange that it would lead to failure, not just truncated 
test output ;)

-- 
David Faure, fa...@kde.org, http://www.davidfaure.fr
Working on KDE Frameworks 5




Re: purpose unittest (AlternativesModelTest::runJobTest) fails randomly

2018-08-06 Thread David Faure
On lundi 6 août 2018 10:52:52 CEST Ben Cooksley wrote:
> On Mon, Aug 6, 2018 at 7:27 PM, David Faure  wrote:
> > On lundi 6 août 2018 01:18:44 CEST Aleix Pol wrote:
> >> On Sat, Aug 4, 2018 at 12:31 PM David Faure  wrote:
> >> > Any idea about this test that fails sometimes? Timing issue? The wait()
> >> > should be longer in case of slow network?
> >> > 
> >> > https://build.kde.org/view/Frameworks/job/Frameworks%20purpose%20kf5-qt
> >> > 5%2
> >> > 0SUSEQt5.10/92/testReport/junit/(root)/TestSuite/alternativesmodeltest/
> >> 
> >> Hi,
> >> Yes, I looked into fixing it, it seemed like it was but then it wasn't
> >> (yay randomness!).
> >> 
> >> My guess is that it's because kf5.kio.core.copyjob prints the whole
> >> URL which in this case it's a data one (which I tried to fix in
> >> 64492796aa7ca4b63dbae419f47e14da15fbcc51). I failed because it still
> >> prints I added "+
> >> QLoggingCategory::setFilterRules(QStringLiteral("kf5.kio.core.copyjob=fal
> >> se" ));" I'm not sure why this has the effect I hoped it would. Any
> >> ideas?> 
> > If $QT_LOGGING_RULES is set to something like '*.debug=true" then this
> > overrides anything you do programmatically with setFilterRules.
> > 
> > I'm not sure if that's what the CI does, though?
> 
> The CI sets QT_LOGGING_RULES exactly as you describe :)
> This is done at
> https://cgit.kde.org/sysadmin/ci-tooling.git/tree/helpers/run-tests.py#n79

OK, thanks.

> > I guess one possible fix would be a shortenUrl() helper in KIO's
> > copyjob.cpp to never print out such a long URL in full (sounds like this
> > would be useful for developers too, not just for CI...).

Actually the right fix would be:
https://codereview.qt-project.org/236112

-- 
David Faure, fa...@kde.org, http://www.davidfaure.fr
Working on KDE Frameworks 5





Re: purpose unittest (AlternativesModelTest::runJobTest) fails randomly

2018-08-06 Thread Ben Cooksley
On Mon, Aug 6, 2018 at 7:27 PM, David Faure  wrote:
> On lundi 6 août 2018 01:18:44 CEST Aleix Pol wrote:
>> On Sat, Aug 4, 2018 at 12:31 PM David Faure  wrote:
>> > Any idea about this test that fails sometimes? Timing issue? The wait()
>> > should be longer in case of slow network?
>> >
>> > https://build.kde.org/view/Frameworks/job/Frameworks%20purpose%20kf5-qt5%2
>> > 0SUSEQt5.10/92/testReport/junit/(root)/TestSuite/alternativesmodeltest/
>> Hi,
>> Yes, I looked into fixing it, it seemed like it was but then it wasn't
>> (yay randomness!).
>>
>> My guess is that it's because kf5.kio.core.copyjob prints the whole
>> URL which in this case it's a data one (which I tried to fix in
>> 64492796aa7ca4b63dbae419f47e14da15fbcc51). I failed because it still
>> prints I added "+
>> QLoggingCategory::setFilterRules(QStringLiteral("kf5.kio.core.copyjob=false"
>> ));" I'm not sure why this has the effect I hoped it would. Any ideas?
>
> If $QT_LOGGING_RULES is set to something like '*.debug=true" then this
> overrides anything you do programmatically with setFilterRules.
>
> I'm not sure if that's what the CI does, though?

The CI sets QT_LOGGING_RULES exactly as you describe :)
This is done at
https://cgit.kde.org/sysadmin/ci-tooling.git/tree/helpers/run-tests.py#n79

>
> I guess one possible fix would be a shortenUrl() helper in KIO's copyjob.cpp
> to never print out such a long URL in full (sounds like this would be useful
> for developers too, not just for CI...).
>
> --
> David Faure, fa...@kde.org, http://www.davidfaure.fr
> Working on KDE Frameworks 5
>
>
>

Cheers,
Ben


Re: purpose unittest (AlternativesModelTest::runJobTest) fails randomly

2018-08-06 Thread David Faure
On lundi 6 août 2018 01:18:44 CEST Aleix Pol wrote:
> On Sat, Aug 4, 2018 at 12:31 PM David Faure  wrote:
> > Any idea about this test that fails sometimes? Timing issue? The wait()
> > should be longer in case of slow network?
> > 
> > https://build.kde.org/view/Frameworks/job/Frameworks%20purpose%20kf5-qt5%2
> > 0SUSEQt5.10/92/testReport/junit/(root)/TestSuite/alternativesmodeltest/
> Hi,
> Yes, I looked into fixing it, it seemed like it was but then it wasn't
> (yay randomness!).
> 
> My guess is that it's because kf5.kio.core.copyjob prints the whole
> URL which in this case it's a data one (which I tried to fix in
> 64492796aa7ca4b63dbae419f47e14da15fbcc51). I failed because it still
> prints I added "+
> QLoggingCategory::setFilterRules(QStringLiteral("kf5.kio.core.copyjob=false"
> ));" I'm not sure why this has the effect I hoped it would. Any ideas?

If $QT_LOGGING_RULES is set to something like '*.debug=true" then this 
overrides anything you do programmatically with setFilterRules.

I'm not sure if that's what the CI does, though?

I guess one possible fix would be a shortenUrl() helper in KIO's copyjob.cpp 
to never print out such a long URL in full (sounds like this would be useful 
for developers too, not just for CI...).

-- 
David Faure, fa...@kde.org, http://www.davidfaure.fr
Working on KDE Frameworks 5





Re: purpose unittest (AlternativesModelTest::runJobTest) fails randomly

2018-08-05 Thread Aleix Pol
On Sat, Aug 4, 2018 at 12:31 PM David Faure  wrote:
>
> Any idea about this test that fails sometimes? Timing issue? The wait() 
> should be longer in case of slow network?
>
> https://build.kde.org/view/Frameworks/job/Frameworks%20purpose%20kf5-qt5%20SUSEQt5.10/92/testReport/junit/(root)/TestSuite/alternativesmodeltest/

Hi,
Yes, I looked into fixing it, it seemed like it was but then it wasn't
(yay randomness!).

My guess is that it's because kf5.kio.core.copyjob prints the whole
URL which in this case it's a data one (which I tried to fix in
64492796aa7ca4b63dbae419f47e14da15fbcc51). I failed because it still
prints I added "+
QLoggingCategory::setFilterRules(QStringLiteral("kf5.kio.core.copyjob=false"));"
I'm not sure why this has the effect I hoped it would. Any ideas?

Aleix