Search in sources :

Example 61 with Status

use of site.ycsb.Status in project YCSB by brianfrankcooper.

the class RestClientTest method update_200.

@Test
public void update_200() {
    HashMap<String, ByteIterator> data = new HashMap<String, ByteIterator>();
    data.put(DATA_TAG, new StringByteIterator(INPUT_DATA));
    Status status = rc.update(null, VALID_RESOURCE, data);
    assertEquals(Status.OK, status);
}
Also used : Status(site.ycsb.Status) ByteIterator(site.ycsb.ByteIterator) StringByteIterator(site.ycsb.StringByteIterator) HashMap(java.util.HashMap) StringByteIterator(site.ycsb.StringByteIterator) Test(org.junit.Test)

Example 62 with Status

use of site.ycsb.Status in project YCSB by brianfrankcooper.

the class RestClientTest method delete_200.

// Delete success.
@Test
public void delete_200() {
    Status status = rc.delete(null, VALID_RESOURCE);
    assertEquals(Status.OK, status);
}
Also used : Status(site.ycsb.Status) Test(org.junit.Test)

Example 63 with Status

use of site.ycsb.Status in project YCSB by brianfrankcooper.

the class RestClientTest method read_500.

// Server error.
@Test
public void read_500() {
    HashMap<String, ByteIterator> result = new HashMap<String, ByteIterator>();
    Status status = rc.read(null, INVALID_RESOURCE, null, result);
    assertEquals(Status.ERROR, status);
}
Also used : Status(site.ycsb.Status) ByteIterator(site.ycsb.ByteIterator) StringByteIterator(site.ycsb.StringByteIterator) HashMap(java.util.HashMap) Test(org.junit.Test)

Example 64 with Status

use of site.ycsb.Status in project YCSB by brianfrankcooper.

the class RestClientTest method update_404.

@Test
public void update_404() {
    HashMap<String, ByteIterator> data = new HashMap<String, ByteIterator>();
    data.put(DATA_TAG, new StringByteIterator(INPUT_DATA));
    Status status = rc.update(null, ABSENT_RESOURCE, data);
    assertEquals(Status.NOT_FOUND, status);
}
Also used : Status(site.ycsb.Status) ByteIterator(site.ycsb.ByteIterator) StringByteIterator(site.ycsb.StringByteIterator) HashMap(java.util.HashMap) StringByteIterator(site.ycsb.StringByteIterator) Test(org.junit.Test)

Example 65 with Status

use of site.ycsb.Status in project YCSB by brianfrankcooper.

the class RestClientTest method insert_500.

@Test
public void insert_500() {
    HashMap<String, ByteIterator> data = new HashMap<String, ByteIterator>();
    data.put(DATA_TAG, new StringByteIterator(INPUT_DATA));
    Status status = rc.insert(null, INVALID_RESOURCE, data);
    assertEquals(Status.ERROR, status);
}
Also used : Status(site.ycsb.Status) ByteIterator(site.ycsb.ByteIterator) StringByteIterator(site.ycsb.StringByteIterator) HashMap(java.util.HashMap) StringByteIterator(site.ycsb.StringByteIterator) Test(org.junit.Test)

Aggregations

Status (site.ycsb.Status)101 Test (org.junit.Test)80 ByteIterator (site.ycsb.ByteIterator)62 HashMap (java.util.HashMap)60 StringByteIterator (site.ycsb.StringByteIterator)60 ResultSet (com.datastax.driver.core.ResultSet)6 Row (com.datastax.driver.core.Row)6 Select (com.datastax.driver.core.querybuilder.Select)6 Vector (java.util.Vector)6 ByteArrayByteIterator (site.ycsb.ByteArrayByteIterator)5 DBException (site.ycsb.DBException)5 Assume.assumeNoException (org.junit.Assume.assumeNoException)4 DB (site.ycsb.DB)4 Get (org.apache.hadoop.hbase.client.Get)3 Put (org.apache.hadoop.hbase.client.Put)3 Result (org.apache.hadoop.hbase.client.Result)3 DatastoreException (com.google.datastore.v1.client.DatastoreException)2 Map (java.util.Map)2 User (org.apache.gora.benchmark.generated.User)2 NumericByteIterator (site.ycsb.NumericByteIterator)2