use of com.palantir.atlasdb.table.description.ColumnMetadataDescription in project atlasdb by palantir.
the class TransactionTestSetup method setUp.
@Before
public void setUp() throws Exception {
lockService = LockServiceImpl.create(LockServerOptions.builder().isStandaloneServer(false).build());
lockClient = LockClient.of("test_client");
keyValueService = getKeyValueService();
keyValueService.createTables(ImmutableMap.of(TEST_TABLE_THOROUGH, new TableMetadata(new NameMetadataDescription(), new ColumnMetadataDescription(), ConflictHandler.RETRY_ON_WRITE_WRITE, TableMetadataPersistence.CachePriority.WARM, true, 4, true, TableMetadataPersistence.SweepStrategy.THOROUGH, false, TableMetadataPersistence.LogSafety.UNSAFE).persistToBytes(), TEST_TABLE, new TableMetadata(new NameMetadataDescription(), new ColumnMetadataDescription(), ConflictHandler.RETRY_ON_WRITE_WRITE, TableMetadataPersistence.CachePriority.WARM, true, 4, true, TableMetadataPersistence.SweepStrategy.NOTHING, false, TableMetadataPersistence.LogSafety.UNSAFE).persistToBytes(), TransactionConstants.TRANSACTION_TABLE, TransactionConstants.TRANSACTION_TABLE_METADATA.persistToBytes()));
keyValueService.truncateTables(ImmutableSet.of(TEST_TABLE, TransactionConstants.TRANSACTION_TABLE));
timestampService = new InMemoryTimestampService();
transactionService = TransactionServices.createTransactionService(keyValueService);
conflictDetectionManager = ConflictDetectionManagers.createWithoutWarmingCache(keyValueService);
sweepStrategyManager = SweepStrategyManagers.createDefault(keyValueService);
txMgr = getManager();
}
use of com.palantir.atlasdb.table.description.ColumnMetadataDescription in project atlasdb by palantir.
the class OneNodeDownMetadataTest method putMetadataForTablesThrows.
@Test
public void putMetadataForTablesThrows() {
TableMetadata newTableMetadata = new TableMetadata(new NameMetadataDescription(), new ColumnMetadataDescription(), ConflictHandler.IGNORE_ALL);
assertThatThrownBy(() -> OneNodeDownTestSuite.kvs.putMetadataForTables(ImmutableMap.of(OneNodeDownTestSuite.TEST_TABLE, newTableMetadata.persistToBytes()))).isExactlyInstanceOf(AtlasDbDependencyException.class).hasCauseInstanceOf(IllegalStateException.class).hasStackTraceContaining("At schema version UNREACHABLE");
canGetMetadataForTable();
}
use of com.palantir.atlasdb.table.description.ColumnMetadataDescription in project atlasdb by palantir.
the class OneNodeDownMetadataTest method putMetadataForTableThrows.
@Test
public void putMetadataForTableThrows() {
TableMetadata newTableMetadata = new TableMetadata(new NameMetadataDescription(), new ColumnMetadataDescription(), ConflictHandler.IGNORE_ALL);
assertThatThrownBy(() -> OneNodeDownTestSuite.kvs.putMetadataForTable(OneNodeDownTestSuite.TEST_TABLE, newTableMetadata.persistToBytes())).isExactlyInstanceOf(AtlasDbDependencyException.class).hasCauseInstanceOf(IllegalStateException.class).hasStackTraceContaining("At schema version UNREACHABLE");
canGetMetadataForTable();
}
Aggregations