1818package org .apache .hadoop .hbase .client ;
1919
2020import static org .junit .Assert .assertEquals ;
21+ import static org .junit .Assert .assertFalse ;
22+ import static org .junit .Assert .assertTrue ;
2123import static org .junit .Assert .fail ;
2224
2325import java .io .IOException ;
@@ -115,7 +117,7 @@ public void testRestoreSnapshotWithTTLSuccess() throws Exception {
115117 String snapshotName = "nonExpiredTTLRestoreSnapshotTest" ;
116118
117119 // table should exist
118- assertEquals ( true , UTIL .getAdmin ().tableExists (TABLE_NAME ));
120+ assertTrue ( UTIL .getAdmin ().tableExists (TABLE_NAME ));
119121
120122 // create snapshot fo given table with specified ttl
121123 createSnapshotWithTTL (TABLE_NAME , snapshotName , CHORE_INTERVAL_SECS * 2 );
@@ -124,21 +126,21 @@ public void testRestoreSnapshotWithTTLSuccess() throws Exception {
124126 // Disable and drop table
125127 admin .disableTable (TABLE_NAME );
126128 admin .deleteTable (TABLE_NAME );
127- assertEquals ( false , UTIL .getAdmin ().tableExists (TABLE_NAME ));
129+ assertFalse ( UTIL .getAdmin ().tableExists (TABLE_NAME ));
128130
129131 // restore snapshot
130132 admin .restoreSnapshot (snapshotName );
131133
132134 // table should be created
133- assertEquals ( true , UTIL .getAdmin ().tableExists (TABLE_NAME ));
135+ assertTrue ( UTIL .getAdmin ().tableExists (TABLE_NAME ));
134136 }
135137
136138 @ Test
137139 public void testRestoreSnapshotFailsDueToTTLExpired () throws Exception {
138140 String snapshotName = "expiredTTLRestoreSnapshotTest" ;
139141
140142 // table should exist
141- assertEquals ( true , UTIL .getAdmin ().tableExists (TABLE_NAME ));
143+ assertTrue ( UTIL .getAdmin ().tableExists (TABLE_NAME ));
142144
143145 // create snapshot fo given table with specified ttl
144146 createSnapshotWithTTL (TABLE_NAME , snapshotName , 1 );
@@ -147,7 +149,7 @@ public void testRestoreSnapshotFailsDueToTTLExpired() throws Exception {
147149 // Disable and drop table
148150 admin .disableTable (TABLE_NAME );
149151 admin .deleteTable (TABLE_NAME );
150- assertEquals ( false , UTIL .getAdmin ().tableExists (TABLE_NAME ));
152+ assertFalse ( UTIL .getAdmin ().tableExists (TABLE_NAME ));
151153
152154 // Sleep so that TTL may expire
153155 Threads .sleep (2000 );
@@ -161,15 +163,15 @@ public void testRestoreSnapshotFailsDueToTTLExpired() throws Exception {
161163 }
162164
163165 // table should not be created
164- assertEquals ( false , UTIL .getAdmin ().tableExists (TABLE_NAME ));
166+ assertFalse ( UTIL .getAdmin ().tableExists (TABLE_NAME ));
165167 }
166168
167169 @ Test
168170 public void testCloneSnapshotWithTTLSuccess () throws Exception {
169171 String snapshotName = "nonExpiredTTLCloneSnapshotTest" ;
170172
171173 // table should exist
172- assertEquals ( true , UTIL .getAdmin ().tableExists (TABLE_NAME ));
174+ assertTrue ( UTIL .getAdmin ().tableExists (TABLE_NAME ));
173175
174176 // create snapshot fo given table with specified ttl
175177 createSnapshotWithTTL (TABLE_NAME , snapshotName , CHORE_INTERVAL_SECS * 2 );
@@ -179,21 +181,21 @@ public void testCloneSnapshotWithTTLSuccess() throws Exception {
179181 admin .cloneSnapshot (snapshotName , CLONED_TABLE_NAME );
180182
181183 // table should be created
182- assertEquals ( true , UTIL .getAdmin ().tableExists (CLONED_TABLE_NAME ));
184+ assertTrue ( UTIL .getAdmin ().tableExists (CLONED_TABLE_NAME ));
183185 }
184186
185187 @ Test
186188 public void testCloneSnapshotFailsDueToTTLExpired () throws Exception {
187189 String snapshotName = "expiredTTLCloneSnapshotTest" ;
188190
189191 // table should exist
190- assertEquals ( true , UTIL .getAdmin ().tableExists (TABLE_NAME ));
192+ assertTrue ( UTIL .getAdmin ().tableExists (TABLE_NAME ));
191193
192194 // create snapshot fo given table with specified ttl
193195 createSnapshotWithTTL (TABLE_NAME , snapshotName , 1 );
194196 Admin admin = UTIL .getAdmin ();
195197
196- assertEquals ( true , UTIL .getAdmin ().tableExists (TABLE_NAME ));
198+ assertTrue ( UTIL .getAdmin ().tableExists (TABLE_NAME ));
197199
198200 // Sleep so that TTL may expire
199201 Threads .sleep (2000 );
@@ -207,7 +209,7 @@ public void testCloneSnapshotFailsDueToTTLExpired() throws Exception {
207209 }
208210
209211 // table should not be created
210- assertEquals ( false , UTIL .getAdmin ().tableExists (CLONED_TABLE_NAME ));
212+ assertFalse ( UTIL .getAdmin ().tableExists (CLONED_TABLE_NAME ));
211213 }
212214
213215 private void createSnapshotWithTTL (TableName tableName , final String snapshotName ,
0 commit comments