Soloplan / whatson

Build status monitoring for Windows with support for Jenkins, Travis-CI, CC.NET (alternative to CCTray)
MIT License
19 stars 4 forks source link

Builds are sometimes not added to the history list #31

Closed dominikgolda closed 4 years ago

dominikgolda commented 4 years ago

buildsSometimesNotAdded

There is a failing unit test BuildsShouldNotBeMissedWhenBuildsAreRunningOneAfterAnother. I think it fails on some mocks, which were not refactored, but maybe fixing it is some starting point.

dominikgolda commented 4 years ago

af387d0b is likely cause of the problem. It certainly breaks the unit test.

dominikgolda commented 4 years ago

The bug itself is fixed. Only the unit test remains to be fixed.

dominikgolda commented 4 years ago

It turns out the unit test was failing because the feature wasn't working. The problem was due to how adding to queue works. We first remove the last value, then we add new one and then we sort by age. As a result when we had ex. builds 10, 9, 8, 7, 6 and we added 11, 10, 9, 8, 7 in turns the result was that we ended up with 11, 10, 10, 9, 7. The steps were:

The fix was to just query the missing build and add it to queue, which should improve performance. Alternatively we could clear the history before reloading it.

Apart from what was actually not working the unit test required adjusting to changes in JenkinAPI class.