[Webkit-unassigned] [Bug 152910] Add QUnit for unit testing and add a unit test to test BuildbotQueueView._appendPendingRevisionCount.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 11 14:12:41 PST 2016


https://bugs.webkit.org/show_bug.cgi?id=152910

--- Comment #5 from Jason Marcell <jmarcell at apple.com> ---
(In reply to comment #4)
> Comment on attachment 268561 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=268561&action=review
> 
> > Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/tests.js:2
> > +QUnit.test("BuildBotQueue Test", function( assert )
> 
> Please remove the space characters inside the parentheses.

Will do.

> 
> > Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/tests.js:5
> > +    assert.ok(trac, "trac is not null");
> 
> What is the purpose of this test? I mean, this test is not meaningful given
> that trac is guaranteed to be non-null by definition of the new operator.

Will remove.

> 
> > Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/tests.js:11
> > +            name: "Webkit Repo",
> 
> Nit: Webkit => WebKit

Will fix.

> 
> > Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/tests.js:15
> > +    assert.ok(queue, "queue is not null");
> 
> Similarly, this test is not meaningful by the same reason as given in my
> remark for line 5. Moreover, if queue was null then this script would cause
> a JavaScript TypeError when we assign property branches to it on line 8; =>
> we would never execute this line.

Will remove.

> 
> > Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/tests.js:18
> > +    assert.ok(view, "view is not null");
> 
> Similarly, this is test is not meaningful.

Ditto.

> 
> > Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/tests.js:22
> > +    var revisionsBehind = view.element.getElementsByClassName("message")[0].innerHTML.match(/.*(\d+) revision(|s) behind/)[1];
> > +    assert.equal(revisionsBehind, 1, "assert revisions behind");
> 
> Can you elaborate on how we are one revision behind?

The MockBuildbotQueueView is programmed to return 33020 as the "_latestProductiveIteration" whereas the "latestRecordedRevisionNumber" is 33022 and 33021 is on "someOtherBranch". Therefore, out of all of the known revision numbers on "trunk", there is only one revision, 33022, which is later than the "_latestProductiveIteration".

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160111/00ac0799/attachment.html>


More information about the webkit-unassigned mailing list