File tree 2 files changed +7
-10
lines changed
main/java/com/smartcodeltd/jenkinsci/plugins/buildmonitor/viewmodel
test/java/com/smartcodeltd/jenkinsci/plugins/buildmonitor/viewmodel
2 files changed +7
-10
lines changed Original file line number Diff line number Diff line change 13
13
import hudson .model .Run ;
14
14
import hudson .model .User ;
15
15
16
- import java .util .Date ;
17
- import java .util .HashSet ;
18
- import java .util .List ;
19
- import java .util .Set ;
16
+ import java .util .*;
20
17
21
18
public class BuildView implements BuildViewModel {
22
19
@@ -123,7 +120,7 @@ public BuildViewModel previousBuild() {
123
120
124
121
@ Override
125
122
public Set <String > culprits () {
126
- Set <String > culprits = new HashSet <String >();
123
+ Set <String > culprits = new TreeSet <String >();
127
124
128
125
if (build instanceof AbstractBuild <?, ?>) {
129
126
AbstractBuild <?, ?> jenkinsBuild = (AbstractBuild <?, ?>) build ;
Original file line number Diff line number Diff line change @@ -349,11 +349,11 @@ public void should_tell_who_broke_the_build() throws Exception {
349
349
}
350
350
351
351
@ Test
352
- public void should_list_committers_who_broke_the_build () throws Exception {
352
+ public void should_list_committers_who_broke_the_build_in_alphabetical_order () throws Exception {
353
353
view = a (jobView ().of (
354
354
a (job ().whereTheLast (build ().wasBrokenBy ("Adam" , "Ben" )))));
355
355
356
- assertThat (view .headline (), is ("Failed after Ben and Adam committed their changes" ));
356
+ assertThat (view .headline (), is ("Failed after Adam and Ben committed their changes" ));
357
357
}
358
358
359
359
@ Test
@@ -380,10 +380,10 @@ public void should_tell_the_number_of_broken_builds_since_the_last_broken_build(
380
380
public void should_tell_the_number_of_broken_builds_since_the_last_build_broken_by_multiple_committers () throws Exception {
381
381
view = a (jobView ().of (
382
382
a (job ().whereTheLast (build ().wasBrokenBy ("Adam" )).
383
- andThePrevious (build ().wasBrokenBy ("Ben" , "Connor" )).
384
- andThePrevious (build ().succeededThanksTo ("Daniel " )))));
383
+ andThePrevious (build ().wasBrokenBy ("Daniel" , " Ben" , "Connor" )).
384
+ andThePrevious (build ().succeededThanksTo ("Errol " )))));
385
385
386
- assertThat (view .headline (), is ("1 build has failed since Ben and Connor committed their changes" ));
386
+ assertThat (view .headline (), is ("1 build has failed since Ben, Connor and Daniel committed their changes" ));
387
387
}
388
388
389
389
/*
You can’t perform that action at this time.
0 commit comments