Re: ant git commit: Use try-with-resources and ExpectedException
Gintas, On 14/08/18 10:14 PM, gin...@apache.org wrote: > http://git-wip-us.apache.org/repos/asf/ant/blob/e648224f/src/tests/junit/org/apache/tools/ant/taskdefs/email/EmailTaskTest.java > -- > diff --git > a/src/tests/junit/org/apache/tools/ant/taskdefs/email/EmailTaskTest.java > b/src/tests/junit/org/apache/tools/ant/taskdefs/email/EmailTaskTest.java > index a77fc92..0d0c36a 100644 > --- a/src/tests/junit/org/apache/tools/ant/taskdefs/email/EmailTaskTest.java > +++ b/src/tests/junit/org/apache/tools/ant/taskdefs/email/EmailTaskTest.java > @@ -25,6 +25,7 @@ import org.junit.Assert; > import org.junit.Before; > import org.junit.Rule; > import org.junit.Test; > +import org.junit.rules.ExpectedException; > > /** > * TODO : develop these testcases - the email task needs to have attributes > allowing > @@ -35,6 +36,9 @@ public class EmailTaskTest { > @Rule > public BuildFileRule buildRule = new BuildFileRule(); > > +@Rule > +public ExpectedException thrown = ExpectedException.none(); > + > @Before > public void setUp() { > > buildRule.configureProject("src/etc/testcases/taskdefs/email/mail.xml"); > @@ -45,14 +49,9 @@ public class EmailTaskTest { > */ > @Test > public void test1() { > -try { > -buildRule.executeTarget("test1"); > -} catch (BuildException e) { > -// assert it's the expected one > -if (!e.getMessage().equals("SMTP auth only possible with MIME > mail")) { > -throw e; > -} > -} > +thrown.expect(BuildException.class); > +thrown.expectMessage("SMTP auth only possible with MIME mail"); > +buildRule.executeTarget("test1"); > } > > /** > @@ -60,14 +59,9 @@ public class EmailTaskTest { > */ > @Test > public void test2() { > -try { > -buildRule.executeTarget("test2"); > -} catch (BuildException e) { > -// assert it's the expected one > -if (!e.getMessage().equals("SSL and STARTTLS only possible with > MIME mail")) { > -throw e; > -} > -} > +thrown.expect(BuildException.class); > +thrown.expectMessage("SSL and STARTTLS only possible with MIME > mail"); > +buildRule.executeTarget("test2"); > } > > /** Could you tell me what was technically wrong with the way I had committed it yesterday and why you felt that it had to be changed into this form? When I looked into this test during the last couple of days, I realized they weren't functional and were broken. So I fixed them and used a particular coding style that I am comfortable with. I am not a fan of using the @Rule based expected exceptions which are stored as member variables in the class and which then have to be setup before the actual testing happens. To me the try/catch block is much more intuitive and gives me more control as well as a better read of what the test case expects. Keeping that detail aside, I decided to use a particular coding style that I was comfortable with when adding that code. The tests are working fine. So what was the need to override that commit with a coding style change? Is this how you are going to continue with your future commits? -Jaikiran - To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org For additional commands, e-mail: dev-h...@ant.apache.org
[GitHub] ant-ivy pull request #63: IVY-1486 respect exclude regardless of order
Github user twogee closed the pull request at: https://github.com/apache/ant-ivy/pull/63 --- - To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org For additional commands, e-mail: dev-h...@ant.apache.org
Re: ant git commit: Update contributor lists, trim trailing whitespace
I checked the logs and used the contributors page on project website. Gintas > On 14 Aug 2018, at 09:41, Dominique Devienne wrote: > > That's 20+ more contributors in one go. > > You've combed the commit log to add these people? > What process exactly did you us? > > --DD > >> On Mon, Aug 13, 2018 at 8:28 PM wrote: >> >> Repository: ant >> Updated Branches: >> refs/heads/master c9c41729a -> 1afbe154a >> >> >> Update contributor lists, trim trailing whitespace >> >> Project: http://git-wip-us.apache.org/repos/asf/ant/repo >> Commit: http://git-wip-us.apache.org/repos/asf/ant/commit/1afbe154 >> Tree: http://git-wip-us.apache.org/repos/asf/ant/tree/1afbe154 >> Diff: http://git-wip-us.apache.org/repos/asf/ant/diff/1afbe154 >> >> Branch: refs/heads/master >> Commit: 1afbe154ab4048d7804486101b82d4cd3fb9ba30 >> Parents: c9c4172 >> Author: Gintas Grigelionis >> Authored: Mon Aug 13 20:27:54 2018 +0200 >> Committer: Gintas Grigelionis >> Committed: Mon Aug 13 20:27:54 2018 +0200 >> >> -- >> CONTRIBUTORS | 22 + >> contributors.xml | 89 ++ >> manual/Tasks/available.html | 2 + >> manual/Tasks/junitlauncher.html | 38 +++ >> manual/install.html | 9 ++-- >> src/etc/poms/ant-javamail/pom.xml | 6 +-- >> 6 files changed, 140 insertions(+), 26 deletions(-) >> -- >> >> >> http://git-wip-us.apache.org/repos/asf/ant/blob/1afbe154/CONTRIBUTORS >> -- >> diff --git a/CONTRIBUTORS b/CONTRIBUTORS >> index 933a8fd..944f3f4 100644 >> --- a/CONTRIBUTORS >> +++ b/CONTRIBUTORS >> @@ -2,9 +2,11 @@ Amongst other, the following people contributed to ant: >> >> Adam Blinkinsop >> Adam Bryzak >> +Adam Murdoch >> Adam Retter >> Adam Sotona >> Adrian Nistor >> +Adrien Grand >> Aleksandr Ishutin >> Alex Rosen >> Alexei Yudichev >> @@ -28,13 +30,16 @@ Anthony Wat >> Antoine Baudoux >> Antoine Levy-Lambert >> Anton Mazkovoi >> +Arcadius Ahouansou >> Arjan Veenstra >> Arnaud Vandyck >> Arnout J. Kuiper >> +Arun Jamwal >> Aslak Hellesôy >> Atsuhiko Yamanaka >> Avik Sengupta >> Balazs Fejes 2 >> +barney2k7 >> Bart Vanhaute >> Ben Galbraith >> Ben Gertzfield >> @@ -50,6 +55,7 @@ Brian Felder >> Brian Repko >> Bruce Atherton >> Cedomir Igaly >> +Charles Duffy >> Charles Hudak >> Charlie Hubbard >> Chris Hegarty >> @@ -66,6 +72,7 @@ Clemens Hammacher >> Clement OUDOT >> Clive Brettingham-Moore >> Conor MacNeill >> +Costin Manolache >> Craeg Strong >> Craig Cottingham >> Craig R. McClanahan >> @@ -87,6 +94,7 @@ Daniel Trebbien >> Danno Ferrin >> Danny Yates >> Dante Briones >> +Darrell DeBoer >> Davanum Srinivas >> Dave Brondsema >> Dave Brosius >> @@ -111,6 +119,7 @@ Don Brown >> Don Ferguson >> Don Jeffery >> Donal Quinlan >> +Donald Leslie >> Drew Sudell >> Earl Hood >> Edison Guo >> @@ -133,6 +142,7 @@ Frank Zeyda >> František Kučera >> Frédéric Bothamy >> Frederic Lavigne >> +Gal Shachor >> Gary S. Weaver >> Gautam Guliani >> Gene-Sung Chung >> @@ -165,8 +175,10 @@ Ivan Ivanov >> J Bleijenbergh >> JC Mann >> Jack J. Woehr >> +Jacobus Martinus Kruithof >> Jaikiran Pai >> James Duncan Davidson >> +James Todd >> Jan Cumps >> Jan Matèrne >> Jan Mynarik >> @@ -201,12 +213,14 @@ John Sisson >> Jon Dickinson >> Jon Skeet >> Jon S. Stevens >> +Jonathan K. Schneider >> Jose Alberto Fernandez >> Joseph Walton >> Josh Lucas >> Juerg Wanner >> Julian Simpson >> Justin Vallon >> +Justyna Horwat >> Karl Jansen >> Keiron Liddle >> Keith Visco >> @@ -281,10 +295,13 @@ Mounir El Hajj >> Nathan Beyer >> Nick Chalko >> Nick Crossley >> +Nick Davis >> Nick Fortescue >> +Nick King >> Nick Pellow >> Nico Seessle >> Nicola Ken Barozzi >> +Nicolas Lalevée >> Nigel Magnay >> Oliver Merkel >> Oliver Rossmueller >> @@ -316,11 +333,13 @@ Philip Hourihane >> Phillip Wells >> Pierre Delisle >> Pierre Dittgen >> +Preston Bannister >> Ralf Hergert >> Rami Ojares >> Randy Watler >> Raphael Pierquin >> Ray Waldin >> +Razzi Abuissa >> Reinhard Pointner >> Remie Bolte >> René Krell >> @@ -360,6 +379,7 @@ Sean P. Kane >> Sebastian Kantha >> Sebastien Arod >> Shiraz Kanga >> +Simeon Fitch >> Simon Law >> Simone Bordet >> Stefan Bodewig >> @@ -408,10 +428,12 @@ Ulrich Schmidt >> Uwe Schindler >> Valentino Miazzo >> Victor Toni >> +Ville Skyttä >> Vimil Saju >> Vincent Legoll >> Vincent Privat >> Vitold Sedyshev >> +Vladislav Bauer >> Volker Leidl >> Waldek Herka >> Wang Weijun >> >> http://git-wip-us.apache.org/repos/asf/ant/blob/1afbe154/contributors.xml >> -- >> - To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org For additional commands, e-mail: dev-h...@ant.apache.org
Re: ant git commit: Update contributor lists, trim trailing whitespace
That's 20+ more contributors in one go. You've combed the commit log to add these people? What process exactly did you us? --DD On Mon, Aug 13, 2018 at 8:28 PM wrote: > Repository: ant > Updated Branches: > refs/heads/master c9c41729a -> 1afbe154a > > > Update contributor lists, trim trailing whitespace > > Project: http://git-wip-us.apache.org/repos/asf/ant/repo > Commit: http://git-wip-us.apache.org/repos/asf/ant/commit/1afbe154 > Tree: http://git-wip-us.apache.org/repos/asf/ant/tree/1afbe154 > Diff: http://git-wip-us.apache.org/repos/asf/ant/diff/1afbe154 > > Branch: refs/heads/master > Commit: 1afbe154ab4048d7804486101b82d4cd3fb9ba30 > Parents: c9c4172 > Author: Gintas Grigelionis > Authored: Mon Aug 13 20:27:54 2018 +0200 > Committer: Gintas Grigelionis > Committed: Mon Aug 13 20:27:54 2018 +0200 > > -- > CONTRIBUTORS | 22 + > contributors.xml | 89 ++ > manual/Tasks/available.html | 2 + > manual/Tasks/junitlauncher.html | 38 +++ > manual/install.html | 9 ++-- > src/etc/poms/ant-javamail/pom.xml | 6 +-- > 6 files changed, 140 insertions(+), 26 deletions(-) > -- > > > http://git-wip-us.apache.org/repos/asf/ant/blob/1afbe154/CONTRIBUTORS > -- > diff --git a/CONTRIBUTORS b/CONTRIBUTORS > index 933a8fd..944f3f4 100644 > --- a/CONTRIBUTORS > +++ b/CONTRIBUTORS > @@ -2,9 +2,11 @@ Amongst other, the following people contributed to ant: > > Adam Blinkinsop > Adam Bryzak > +Adam Murdoch > Adam Retter > Adam Sotona > Adrian Nistor > +Adrien Grand > Aleksandr Ishutin > Alex Rosen > Alexei Yudichev > @@ -28,13 +30,16 @@ Anthony Wat > Antoine Baudoux > Antoine Levy-Lambert > Anton Mazkovoi > +Arcadius Ahouansou > Arjan Veenstra > Arnaud Vandyck > Arnout J. Kuiper > +Arun Jamwal > Aslak Hellesôy > Atsuhiko Yamanaka > Avik Sengupta > Balazs Fejes 2 > +barney2k7 > Bart Vanhaute > Ben Galbraith > Ben Gertzfield > @@ -50,6 +55,7 @@ Brian Felder > Brian Repko > Bruce Atherton > Cedomir Igaly > +Charles Duffy > Charles Hudak > Charlie Hubbard > Chris Hegarty > @@ -66,6 +72,7 @@ Clemens Hammacher > Clement OUDOT > Clive Brettingham-Moore > Conor MacNeill > +Costin Manolache > Craeg Strong > Craig Cottingham > Craig R. McClanahan > @@ -87,6 +94,7 @@ Daniel Trebbien > Danno Ferrin > Danny Yates > Dante Briones > +Darrell DeBoer > Davanum Srinivas > Dave Brondsema > Dave Brosius > @@ -111,6 +119,7 @@ Don Brown > Don Ferguson > Don Jeffery > Donal Quinlan > +Donald Leslie > Drew Sudell > Earl Hood > Edison Guo > @@ -133,6 +142,7 @@ Frank Zeyda > František Kučera > Frédéric Bothamy > Frederic Lavigne > +Gal Shachor > Gary S. Weaver > Gautam Guliani > Gene-Sung Chung > @@ -165,8 +175,10 @@ Ivan Ivanov > J Bleijenbergh > JC Mann > Jack J. Woehr > +Jacobus Martinus Kruithof > Jaikiran Pai > James Duncan Davidson > +James Todd > Jan Cumps > Jan Matèrne > Jan Mynarik > @@ -201,12 +213,14 @@ John Sisson > Jon Dickinson > Jon Skeet > Jon S. Stevens > +Jonathan K. Schneider > Jose Alberto Fernandez > Joseph Walton > Josh Lucas > Juerg Wanner > Julian Simpson > Justin Vallon > +Justyna Horwat > Karl Jansen > Keiron Liddle > Keith Visco > @@ -281,10 +295,13 @@ Mounir El Hajj > Nathan Beyer > Nick Chalko > Nick Crossley > +Nick Davis > Nick Fortescue > +Nick King > Nick Pellow > Nico Seessle > Nicola Ken Barozzi > +Nicolas Lalevée > Nigel Magnay > Oliver Merkel > Oliver Rossmueller > @@ -316,11 +333,13 @@ Philip Hourihane > Phillip Wells > Pierre Delisle > Pierre Dittgen > +Preston Bannister > Ralf Hergert > Rami Ojares > Randy Watler > Raphael Pierquin > Ray Waldin > +Razzi Abuissa > Reinhard Pointner > Remie Bolte > René Krell > @@ -360,6 +379,7 @@ Sean P. Kane > Sebastian Kantha > Sebastien Arod > Shiraz Kanga > +Simeon Fitch > Simon Law > Simone Bordet > Stefan Bodewig > @@ -408,10 +428,12 @@ Ulrich Schmidt > Uwe Schindler > Valentino Miazzo > Victor Toni > +Ville Skyttä > Vimil Saju > Vincent Legoll > Vincent Privat > Vitold Sedyshev > +Vladislav Bauer > Volker Leidl > Waldek Herka > Wang Weijun > > http://git-wip-us.apache.org/repos/asf/ant/blob/1afbe154/contributors.xml > -- >