Github user poornachandra commented on a diff in the pull request:

    https://github.com/apache/incubator-tephra/pull/18#discussion_r84387667
  
    --- Diff: 
tephra-core/src/test/java/org/apache/tephra/TransactionSystemTest.java ---
    @@ -33,25 +33,33 @@
      */
     public abstract class TransactionSystemTest {
     
    -  public static final byte[] C1 = new byte[] { 'c', '1' };
    -  public static final byte[] C2 = new byte[] { 'c', '2' };
    -  public static final byte[] C3 = new byte[] { 'c', '3' };
    -  public static final byte[] C4 = new byte[] { 'c', '4' };
    +  private static final byte[] C1 = new byte[] { 'c', '1' };
    +  private static final byte[] C2 = new byte[] { 'c', '2' };
    +  private static final byte[] C3 = new byte[] { 'c', '3' };
    +  private static final byte[] C4 = new byte[] { 'c', '4' };
     
       protected abstract TransactionSystemClient getClient() throws Exception;
     
       protected abstract TransactionStateStorage getStateStorage() throws 
Exception;
     
    -  // Unfortunately, in-memory mode and thrift mode throw different 
exceptions here
    -  @Test(expected = Exception.class)
    +  @Test
       public void testNegativeTimeout() throws Exception {
    -    getClient().startShort(-1);
    +    try {
    +      getClient().startShort(-1);
    +      Assert.fail("Expected illegal argument for negative timeout");
    +    } catch (IllegalArgumentException e) {
    +      // expected
    +    }
       }
     
    -  // Unfortunately, in-memory mode and thrift mode throw different 
exceptions here
    -  @Test(expected = Exception.class)
    +  @Test
       public void testExcessiveTimeout() throws Exception {
    -    getClient().startShort((int) TimeUnit.DAYS.toSeconds(10));
    +    try {
    +      getClient().startShort((int) TimeUnit.DAYS.toSeconds(10));
    +      Assert.fail("Expected illegal argument for excessive timeout");
    +    } catch (IllegalArgumentException e) {
    --- End diff --
    
    Same here


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to