> On April 2, 2015, 7:28 p.m., Himanshu Gahlaut wrote:
> > lens-cube/src/test/java/org/apache/lens/cube/metadata/TestTimePartition.java,
> >  line 102
> > <https://reviews.apache.org/r/32610/diff/3/?file=911977#file911977line102>
> >
> >     I guess what we are trying to test on this line is that begin of time 
> > range should be less than end. It can make test cases more modular if this 
> > is a separate test case as described below. Also instead of introducing 
> > getLensExceptionInPartitionRangeCreation method, TestNg's 
> > expectedExceptions attribute in @Test annotation can be used in this 
> > particular use case.
> >     
> >     @Test(expectedExceptions = LensException.class)
> >     public void testTimeRangeBeginShouldBeLessThanEnd() {
> >        // try to create a time range where begin is more than end
> >     }
> 
> Rajat Khandelwal wrote:
>     This line is inside a for loop. Essencially testing that for each update 
> period exception should come. Testng's annotation is good but will have to 
> write a function for each update period. I didn't want test for just one 
> update period and discard all others since they all are instances of an Enum 
> and can be quite different. If an update period is added in future, then it 
> should also follow the restrictions laid down by these test cases.

public boolean before(TimePartition when) {
    return this.date.before(when.date);
}

As per code before method in TimePartition is independent of update period. It 
is only dependent on Date object of TimePartition.
To test that TimePartition begin should be less that TimePartition end in 
TimeRange data model constraint, we don't need to test for all update periods. 
I might be missing something here, please feel free to point the same.


- Himanshu


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32610/#review78699
-----------------------------------------------------------


On April 1, 2015, 6:56 a.m., Rajat Khandelwal wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/32610/
> -----------------------------------------------------------
> 
> (Updated April 1, 2015, 6:56 a.m.)
> 
> 
> Review request for lens.
> 
> 
> Repository: lens
> 
> 
> Description
> -------
> 
> handle storing of large collection objects in timeline data structures
> 
> 
> Diffs
> -----
> 
>   
> lens-cube/src/main/java/org/apache/lens/cube/metadata/CubeMetastoreClient.java
>  1835d2f5f604548126c60592869187c29f0f4392 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/MetastoreUtil.java 
> 0be8e5f2031dad8f175bbd00d3cbfc73695d31db 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/TimePartition.java 
> b948467e61618695cba5b6fcfdc084d8d26c0c4d 
>   
> lens-cube/src/main/java/org/apache/lens/cube/metadata/timeline/EndsAndHolesPartitionTimeline.java
>  79e8a62629b6466f42152678c4267e40f003a5a3 
>   
> lens-cube/src/main/java/org/apache/lens/cube/metadata/timeline/RangesPartitionTimeline.java
>  fb2d0a86d773825cd2a8a635c451e9945b122ce8 
>   
> lens-cube/src/main/java/org/apache/lens/cube/metadata/timeline/StoreAllPartitionTimeline.java
>  d6ee0a17aae8d0952fb685997120dbfc778d2530 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/DateUtil.java 
> 1094e4413c1355655de00b04f8a64e507e2270ee 
>   
> lens-cube/src/test/java/org/apache/lens/cube/metadata/TestTimePartition.java 
> 4c98d84e2c55bedd3226c887b6052a5b5cf77145 
>   
> lens-cube/src/test/java/org/apache/lens/cube/metadata/timeline/TestPartitionTimelines.java
>  50b75e38f9fcd890e96787399d10434cac6f6045 
>   lens-cube/src/test/java/org/apache/lens/cube/parse/CubeTestSetup.java 
> b2ae9b5e8076f1eb22e700bb9e3680346733861a 
> 
> Diff: https://reviews.apache.org/r/32610/diff/
> 
> 
> Testing
> -------
> 
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Reactor Summary:
> [INFO] 
> [INFO] Lens Checkstyle Rules ............................. SUCCESS [2.151s]
> [INFO] Lens .............................................. SUCCESS [1.896s]
> [INFO] Lens API .......................................... SUCCESS [6.175s]
> [INFO] Lens API for server and extensions ................ SUCCESS [6.715s]
> [INFO] Lens Cube ......................................... SUCCESS [2:12.362s]
> [INFO] Lens DB storage ................................... SUCCESS [10.638s]
> [INFO] Lens Query Library ................................ SUCCESS [5.112s]
> [INFO] Lens Hive Driver .................................. SUCCESS [2:31.556s]
> [INFO] Lens Driver for JDBC .............................. SUCCESS [17.345s]
> [INFO] Lens Server ....................................... SUCCESS [6:09.928s]
> [INFO] Lens client ....................................... SUCCESS [20.684s]
> [INFO] Lens CLI .......................................... SUCCESS [2:34.762s]
> [INFO] Lens Examples ..................................... SUCCESS [0.941s]
> [INFO] Lens Distribution ................................. SUCCESS [9.567s]
> [INFO] Lens ML Lib ....................................... SUCCESS [1:01.797s]
> [INFO] Lens ML Ext Distribution .......................... SUCCESS [2.750s]
> [INFO] Lens Regression ................................... SUCCESS [0.525s]
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Total time: 15:55.802s
> [INFO] Finished at: Mon Mar 30 11:44:12 UTC 2015
> [INFO] Final Memory: 96M/1058M
> [INFO] 
> ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Rajat Khandelwal
> 
>

Reply via email to