*/
@Test
public void testFailedCommitAborts() throws IOException, NodeExistsException,
KeeperException {
final Server server = new MockServer(WTU, false);
final FServerServices rss = new MockFServerServices();
FTable wtd = TEST_FTD;
final EntityGroupInfo egi = new EntityGroupInfo(wtd.getTableName(),
FConstants.EMPTY_END_ROW, FConstants.EMPTY_END_ROW);
EntityGroup entityGroup = EntityGroup.createEntityGroup(egi,
WTU.getConfiguration(), wtd, rss);
try {
assertNotNull(entityGroup);
// Spy on the entityGroup so can throw exception when close is called.
EntityGroup spy = Mockito.spy(entityGroup);
final boolean abort = false;
Mockito.when(spy.close(abort)).thenThrow(
new RuntimeException("Mocked failed close!"));
rss.addToOnlineEntityGroups(spy);
assertFalse(server.isStopped());
CloseEntityGroupHandler handler = new CloseEntityGroupHandler(server,
rss, egi, false, false, -1, EventType.M_FSERVER_CLOSE_ENTITYGROUP);
boolean throwable = false;
try {