Search in sources :

Example 86 with ObjectId

use of org.pentaho.di.repository.ObjectId in project pentaho-kettle by pentaho.

the class PurRepositoryStressTest method testLockSaveSlaverSchema.

public void testLockSaveSlaverSchema() throws Exception {
    ObjectId objId = mock(ObjectId.class);
    doReturn("id1").when(objId).getId();
    SlaveServer rei = mock(SlaveServer.class);
    doReturn(RepositoryObjectType.SLAVE_SERVER).when(rei).getRepositoryElementType();
    doReturn("slaveID").when(rei).getName();
    doReturn(objId).when(rei).getObjectId();
    doReturn(rei).when(rei).clone();
    Calendar calendar = mock(Calendar.class);
    purRepository.save(rei, "vComment", calendar, mock(ProgressMonitorListener.class), false);
}
Also used : StringObjectId(org.pentaho.di.repository.StringObjectId) ObjectId(org.pentaho.di.repository.ObjectId) Calendar(java.util.Calendar) SlaveServer(org.pentaho.di.cluster.SlaveServer) ProgressMonitorListener(org.pentaho.di.core.ProgressMonitorListener)

Example 87 with ObjectId

use of org.pentaho.di.repository.ObjectId in project pentaho-kettle by pentaho.

the class PurRepositoryStressTest method testLockLoadTransformation2.

public void testLockLoadTransformation2() throws Exception {
    ObjectId objId = mock(ObjectId.class);
    doReturn("id1").when(objId).getId();
    assertNotNull(purRepository.loadTransformation(objId, "v3"));
    verify(objId, times(2)).getId();
}
Also used : StringObjectId(org.pentaho.di.repository.StringObjectId) ObjectId(org.pentaho.di.repository.ObjectId)

Example 88 with ObjectId

use of org.pentaho.di.repository.ObjectId in project pentaho-kettle by pentaho.

the class PurRepositoryStressTest method testLockLoadSlaveServer.

public void testLockLoadSlaveServer() throws Exception {
    ObjectId objId = mock(ObjectId.class);
    doReturn("id1").when(objId).getId();
    assertNotNull(purRepository.loadSlaveServer(objId, "v1"));
    verify(objId, times(3)).getId();
}
Also used : StringObjectId(org.pentaho.di.repository.StringObjectId) ObjectId(org.pentaho.di.repository.ObjectId)

Example 89 with ObjectId

use of org.pentaho.di.repository.ObjectId in project pentaho-kettle by pentaho.

the class PurRepositoryStressTest method testLocksRenameRepositoryDirectory.

public void testLocksRenameRepositoryDirectory() throws Exception {
    ObjectId objId = mock(ObjectId.class);
    doReturn("id1").when(objId).getId();
    purRepository.renameRepositoryDirectory(objId, null, "newName", true);
    verify(objId, times(2)).getId();
}
Also used : StringObjectId(org.pentaho.di.repository.StringObjectId) ObjectId(org.pentaho.di.repository.ObjectId)

Example 90 with ObjectId

use of org.pentaho.di.repository.ObjectId in project pentaho-kettle by pentaho.

the class UIEETransformation method renameTransformation.

@Override
protected ObjectId renameTransformation(ObjectId objectId, RepositoryDirectory directory, String name) throws Exception {
    ObjectId id = super.renameTransformation(objectId, directory, name);
    refreshRevisions();
    return id;
}
Also used : ObjectId(org.pentaho.di.repository.ObjectId)

Aggregations

ObjectId (org.pentaho.di.repository.ObjectId)233 KettleException (org.pentaho.di.core.exception.KettleException)94 LongObjectId (org.pentaho.di.repository.LongObjectId)76 StringObjectId (org.pentaho.di.repository.StringObjectId)76 RowMetaAndData (org.pentaho.di.core.RowMetaAndData)49 RepositoryDirectoryInterface (org.pentaho.di.repository.RepositoryDirectoryInterface)38 Test (org.junit.Test)37 ValueMetaString (org.pentaho.di.core.row.value.ValueMetaString)37 ErrorDialog (org.pentaho.di.ui.core.dialog.ErrorDialog)34 ValueMetaInteger (org.pentaho.di.core.row.value.ValueMetaInteger)33 ArrayList (java.util.ArrayList)30 DatabaseMeta (org.pentaho.di.core.database.DatabaseMeta)29 MessageBox (org.eclipse.swt.widgets.MessageBox)26 Repository (org.pentaho.di.repository.Repository)18 RepositoryFile (org.pentaho.platform.api.repository2.unified.RepositoryFile)18 SlaveServer (org.pentaho.di.cluster.SlaveServer)15 KettleDatabaseException (org.pentaho.di.core.exception.KettleDatabaseException)14 PartitionSchema (org.pentaho.di.partition.PartitionSchema)14 Matchers.anyString (org.mockito.Matchers.anyString)13 MetaStoreException (org.pentaho.metastore.api.exceptions.MetaStoreException)13