You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ns...@apache.org on 2011/11/17 02:46:15 UTC
svn commit: r1202989 -
/hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactSelection.java
Author: nspiegelberg
Date: Thu Nov 17 01:46:14 2011
New Revision: 1202989
URL: http://svn.apache.org/viewvc?rev=1202989&view=rev
Log:
TestCompactSelection should not fail at night
Summary: Fixing a modular arithmetic bug in TestCompactSelection that makes it
fail at night (from 12am to 2am).
Test Plan: Run the unit test
Reviewers: kranganathan, kannan
Reviewed By: kranganathan
CC: hbase-eng@lists, kranganathan
Differential Revision: 355262
Revert Plan: OK
Modified:
hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactSelection.java
Modified: hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactSelection.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactSelection.java?rev=1202989&r1=1202988&r2=1202989&view=diff
==============================================================================
--- hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactSelection.java (original)
+++ hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactSelection.java Thu Nov 17 01:46:14 2011
@@ -242,8 +242,8 @@ public class TestCompactSelection extend
int hourOfDay = calendar.get(Calendar.HOUR_OF_DAY);
LOG.debug("Hour of day = " + hourOfDay);
int hourPlusOne = ((hourOfDay+1)%24);
- int hourMinusOne = ((hourOfDay-1)%24);
- int hourMinusTwo = ((hourOfDay-2)%24);
+ int hourMinusOne = ((hourOfDay-1+24)%24);
+ int hourMinusTwo = ((hourOfDay-2+24)%24);
// check compact selection without peak hour setting
LOG.debug("Testing compact selection without off-peak settings...");