SortedDataInterface::insert should return an error status (ErrorCodes::InternalError?) if try to insert a key at minDiskLoc or maxDiskLoc.
scoped_ptr<HarnessHelper> harnessHelper( newHarnessHelper() );
scoped_ptr<SortedDataInterface> sorted( harnessHelper->newSortedDataInterface() );
{
scoped_ptr<OperationContext> opCtx( harnessHelper->newOperationContext() );
ASSERT( sorted->isEmpty( opCtx.get() ) );
}
{
scoped_ptr<OperationContext> opCtx( harnessHelper->newOperationContext() );
{
WriteUnitOfWork uow( opCtx.get() );
ASSERT_NOT_OK( sorted->insert( opCtx.get(), key1, minDiskLoc, false ) );
ASSERT_NOT_OK( sorted->insert( opCtx.get(), key1, minDiskLoc, true ) );
uow.commit();
}
}
{
scoped_ptr<OperationContext> opCtx( harnessHelper->newOperationContext() );
ASSERT( sorted->isEmpty( opCtx.get() ) );
}