Search in sources :

Example 1 with WriteResult

use of com.datastax.oss.dsbulk.executor.api.result.WriteResult in project dsbulk by datastax.

the class BulkExecutorTestBase method writeSyncStatementTest.

@Test
void writeSyncStatementTest() {
    BulkExecutor executor = newBulkExecutor(false);
    WriteResult r = executor.writeSync(successfulWrite1);
    verifySuccessfulWriteResult(r);
    verifySession(1, 0);
}
Also used : WriteResult(com.datastax.oss.dsbulk.executor.api.result.WriteResult) Test(org.junit.jupiter.api.Test)

Example 2 with WriteResult

use of com.datastax.oss.dsbulk.executor.api.result.WriteResult in project dsbulk by datastax.

the class BulkExecutorTestBase method writeAsyncStatementTest.

@Test
void writeAsyncStatementTest() throws Exception {
    BulkExecutor executor = newBulkExecutor(false);
    WriteResult r = executor.writeAsync(successfulWrite1).get();
    verifySuccessfulWriteResult(r);
    verifySession(1, 0);
}
Also used : WriteResult(com.datastax.oss.dsbulk.executor.api.result.WriteResult) Test(org.junit.jupiter.api.Test)

Example 3 with WriteResult

use of com.datastax.oss.dsbulk.executor.api.result.WriteResult in project dsbulk by datastax.

the class BulkExecutorTestBase method writeAsyncStringTest.

// Tests for asynchronous write methods
@Test
void writeAsyncStringTest() throws Exception {
    BulkExecutor executor = newBulkExecutor(false);
    WriteResult r = executor.writeAsync("write should succeed 1").get();
    verifySuccessfulWriteResult(r);
    verifySession(1, 0);
}
Also used : WriteResult(com.datastax.oss.dsbulk.executor.api.result.WriteResult) Test(org.junit.jupiter.api.Test)

Example 4 with WriteResult

use of com.datastax.oss.dsbulk.executor.api.result.WriteResult in project dsbulk by datastax.

the class BulkExecutorITBase method writeAsyncStatementFailSafeTest.

@Test
void writeAsyncStatementFailSafeTest() throws Exception {
    WriteResult r = failSafeExecutor.writeAsync(FAILED_STATEMENT).get();
    verifyFailedWriteResult(r);
}
Also used : WriteResult(com.datastax.oss.dsbulk.executor.api.result.WriteResult) Test(org.junit.jupiter.api.Test)

Example 5 with WriteResult

use of com.datastax.oss.dsbulk.executor.api.result.WriteResult in project dsbulk by datastax.

the class BulkExecutorITBase method writeSyncStringFailSafeTest.

@Test
void writeSyncStringFailSafeTest() {
    WriteResult r = failSafeExecutor.writeSync(FAILED_QUERY);
    verifyFailedWriteResult(r);
}
Also used : WriteResult(com.datastax.oss.dsbulk.executor.api.result.WriteResult) Test(org.junit.jupiter.api.Test)

Aggregations

WriteResult (com.datastax.oss.dsbulk.executor.api.result.WriteResult)23 Test (org.junit.jupiter.api.Test)22 Path (java.nio.file.Path)6 DefaultWriteResult (com.datastax.oss.dsbulk.executor.api.result.DefaultWriteResult)5 TooManyErrorsException (com.datastax.oss.dsbulk.workflow.api.error.TooManyErrorsException)4 AllNodesFailedException (com.datastax.oss.driver.api.core.AllNodesFailedException)1 DriverExecutionException (com.datastax.oss.driver.api.core.DriverExecutionException)1 DriverTimeoutException (com.datastax.oss.driver.api.core.DriverTimeoutException)1 RequestThrottlingException (com.datastax.oss.driver.api.core.RequestThrottlingException)1 BusyConnectionException (com.datastax.oss.driver.api.core.connection.BusyConnectionException)1 FrameTooLongException (com.datastax.oss.driver.api.core.connection.FrameTooLongException)1 AsyncResultSet (com.datastax.oss.driver.api.core.cql.AsyncResultSet)1 BatchStatement (com.datastax.oss.driver.api.core.cql.BatchStatement)1 ExecutionInfo (com.datastax.oss.driver.api.core.cql.ExecutionInfo)1 Row (com.datastax.oss.driver.api.core.cql.Row)1 InvalidQueryException (com.datastax.oss.driver.api.core.servererrors.InvalidQueryException)1 QueryExecutionException (com.datastax.oss.driver.api.core.servererrors.QueryExecutionException)1 SyntaxError (com.datastax.oss.driver.api.core.servererrors.SyntaxError)1 BulkExecutionException (com.datastax.oss.dsbulk.executor.api.exception.BulkExecutionException)1 DriverUtils.mockRow (com.datastax.oss.dsbulk.tests.driver.DriverUtils.mockRow)1