> On July 17, 2013, 9:01 p.m., Jarek Cecho wrote: > > core/src/test/java/org/apache/sqoop/repository/TestJdbcRepository.java, > > lines 99-101 > > <https://reviews.apache.org/r/12370/diff/1/?file=319347#file319347line99> > > > > If the purpose is to validate if the method is being called, wouldn't i > > be simpler to mock it with "noop" and use verify() to ensure that it was > > called?
Well, the upgradeConnector() and upgradeFramework() methods are final, which cannot be mocked. So to verify they are being called, I make the first function call inside them throw an exception. - Mengwei ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/12370/#review23316 ----------------------------------------------------------- On July 9, 2013, 8:22 p.m., Mengwei Ding wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/12370/ > ----------------------------------------------------------- > > (Updated July 9, 2013, 8:22 p.m.) > > > Review request for Sqoop and Jarek Cecho. > > > Bugs: SQOOP-996 > https://issues.apache.org/jira/browse/SQOOP-996 > > > Repository: sqoop-sqoop2 > > > Description > ------- > > commit b3602f1d6190926eeffa2fa10e81efdd6611092b > Author: Mengwei Ding <mengwei.d...@cloudera.com> > Date: Wed Jul 3 15:56:49 2013 -0700 > > SQOOP-996: Sqoop2: create upgrade tests > > :100644 100644 0732b2c... 2b6e436... M core/pom.xml > :000000 100644 0000000... 47eb28c... A > core/src/test/java/org/apache/sqoop/repository/TestJdbcRepository.java > > > Diffs > ----- > > core/pom.xml 0732b2c > core/src/test/java/org/apache/sqoop/repository/TestJdbcRepository.java > PRE-CREATION > > Diff: https://reviews.apache.org/r/12370/diff/ > > > Testing > ------- > > > Thanks, > > Mengwei Ding > >