Skip to content

Conversation

@joseblas
Copy link
Contributor

@joseblas joseblas commented Nov 6, 2020

notifyQueued wasn't used at all.
Also added tests for completion.

Copy link
Member

@dwnusbaum dwnusbaum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some tests failing. I think one of the failures is because the Jenkinsfile needs to be updated to remove buildPlugin.recommendedConfigurations because the recommended versions are too old for the current baseline of the plugin (that will need to be done by a maintainer with write access).

null);
executorService.submit(() -> {
QueueItemMetricsListener.notifyStarted(m);
QueueItemMetricsListener.notifyQueued(m);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you accidentally added a 5th space:

Suggested change
QueueItemMetricsListener.notifyQueued(m);
QueueItemMetricsListener.notifyQueued(m);

@batmat
Copy link
Member

batmat commented Nov 10, 2020

Nailed this in #72. Unclear how this could even happen, but once #72 is merged and this one gets rebuilt, we should either see it switch to green, or see some actual failures triggered here.

@batmat batmat closed this Nov 10, 2020
@batmat
Copy link
Member

batmat commented Nov 10, 2020

#72 got merged. Now the failures should be genuine, if any.

@batmat batmat reopened this Nov 10, 2020
@joseblas joseblas requested a review from dwnusbaum November 11, 2020 08:15
Copy link
Member

@dwnusbaum dwnusbaum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, here is a link to the Jira ticket for reference that has some details from when I was filed the issue: JENKINS-63760.

null);
executorService.submit(() -> {
QueueItemMetricsListener.notifyStarted(m);
QueueItemMetricsListener.notifyQueued(m);
Copy link
Member

@dwnusbaum dwnusbaum Nov 11, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has the potential to be a breaking change, but from a quick GitHub search it looks like there aren't any open source plugins using QueueItemMetricsListener in the first place, so the risk seems limited.

Thread.sleep(10);
}

assertThat(listener.state.toString(), containsString("Q"));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please assert with equal? It leaves the test more comprehensive and avoid failures in case we add some new state on the future with this letter. The same for the other cases.

Copy link
Contributor

@MRamonLeon MRamonLeon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I didn't realize this texts where added by you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants