app_rep/unittest/arcus.cpp
/*
 * c1    c2    c3    hint    expect    success    state
 * =====================================================================
 * X     A     A     X       A         True       NO_HINT_POSSIBLY_STALE
 */
c1    c2    c3    hint    expect    success    state


c1 c2 c3 hint expect success state
TEST(ArcusTest, test_Replication_Case5) {
    test_client client;
    memcached_return_t rc;
    client.insert_for_cluster(1, FIELD_STATE, "A");
    client.insert_for_cluster(2, FIELD_STATE, "A");
    cached_data *result = client.get(client.key, FIELD_MIN, FIELD_MAX, NULL, &rc);
    EXPECT_TRUE(result != NULL);
    DEBUG("returned : %s (state=%d)", result->value(FIELD_STATE), result->state);
    EXPECT_STREQ("A", result->value(FIELD_STATE));
    EXPECT_EQ(::hint::NO_HINT_POSSIBLY_STALE, result->state);
}
TEST ( ArcusTest , test_Replication_Case5 ) { test_client client ; memcached_return_t rc ; client . insert_for_cluster ( 1 , FIELD_STATE , " " ) ; client . insert_for_cluster ( 2 , FIELD_STATE , " " ) ; cached_data * result = client . get ( client . key , FIELD_MIN , FIELD_MAX , NULL , & rc ) ; EXPECT_TRUE ( result != NULL ) ; DEBUG ( " " , result -> value ( FIELD_STATE ) , result -> state ) ; EXPECT_STREQ ( " " , result -> value ( FIELD_STATE ) ) ; EXPECT_EQ ( :: hint :: NO_HINT_POSSIBLY_STALE , result -> state ) ; }
c1    c2    c3    hint    expect    success    state
c1 c2 c3 hint expect success state
//client.insert_for_cluster(0, FIELD_STATE, "A");