Skip to content
Snippets Groups Projects
Verified Commit 11ba13a1 authored by Timm Fitschen's avatar Timm Fitschen
Browse files

WIP: update

parent 0e3924ea
No related branches found
No related tags found
1 merge request!6F update
Pipeline #11229 passed
Pipeline: caosdb-cppinttest

#11233

    ...@@ -165,8 +165,9 @@ auto Transaction::UpdateEntity(Entity *entity) noexcept -> StatusCode { ...@@ -165,8 +165,9 @@ auto Transaction::UpdateEntity(Entity *entity) noexcept -> StatusCode {
    auto Transaction::Execute() -> TransactionStatus { auto Transaction::Execute() -> TransactionStatus {
    ExecuteAsynchronously(); ExecuteAsynchronously();
    this->status.ThrowExceptionIfError(); auto status = WaitForIt();
    return this->status; status.ThrowExceptionIfError();
    return status;
    } }
    auto Transaction::ExecuteAsynchronously() noexcept -> StatusCode { auto Transaction::ExecuteAsynchronously() noexcept -> StatusCode {
    ......
    ...@@ -106,7 +106,7 @@ TEST(test_entity, test_append_property) { // NOLINT ...@@ -106,7 +106,7 @@ TEST(test_entity, test_append_property) { // NOLINT
    TEST(test_entity, test_copy_to) { TEST(test_entity, test_copy_to) {
    auto entity = Entity(); auto entity = Entity();
    entity.SetId("original_id"); entity.SetRole("original_role");
    entity.SetName("orignial_name"); entity.SetName("orignial_name");
    auto parent = Parent(); auto parent = Parent();
    ...@@ -126,7 +126,7 @@ TEST(test_entity, test_copy_to) { ...@@ -126,7 +126,7 @@ TEST(test_entity, test_copy_to) {
    entity.CopyTo(proto_copy); entity.CopyTo(proto_copy);
    auto copied = Entity(proto_copy); auto copied = Entity(proto_copy);
    EXPECT_EQ(entity.GetId(), copied.GetId()); EXPECT_EQ(entity.GetRole(), copied.GetRole());
    EXPECT_EQ(entity.GetName(), copied.GetName()); EXPECT_EQ(entity.GetName(), copied.GetName());
    EXPECT_EQ(copied.GetParents().At(0).GetId(), parent.GetId()); EXPECT_EQ(copied.GetParents().At(0).GetId(), parent.GetId());
    EXPECT_EQ(copied.GetParents().At(0).GetName(), parent.GetName()); EXPECT_EQ(copied.GetParents().At(0).GetName(), parent.GetName());
    ...@@ -177,7 +177,7 @@ TEST(test_entity, test_insert_with_parent) { ...@@ -177,7 +177,7 @@ TEST(test_entity, test_insert_with_parent) {
    std::shared_ptr<transaction::EntityTransactionService::Stub>(nullptr)); std::shared_ptr<transaction::EntityTransactionService::Stub>(nullptr));
    auto entity = Entity(); auto entity = Entity();
    entity.SetId("entity_id"); entity.SetName("entity_name");
    auto parent = Parent(); auto parent = Parent();
    parent.SetId("parent_id"); parent.SetId("parent_id");
    ...@@ -190,7 +190,7 @@ TEST(test_entity, test_insert_with_parent) { ...@@ -190,7 +190,7 @@ TEST(test_entity, test_insert_with_parent) {
    transaction.InsertEntity(&entity); transaction.InsertEntity(&entity);
    std::cout << entity.ToString() << std::endl; std::cout << entity.ToString() << std::endl;
    EXPECT_EQ(entity.GetId(), "entity_id"); EXPECT_EQ(entity.GetName(), "entity_name");
    EXPECT_EQ(entity.GetParents().Size(), 1); EXPECT_EQ(entity.GetParents().Size(), 1);
    auto inserted_parent = entity.GetParents().At(0); auto inserted_parent = entity.GetParents().At(0);
    EXPECT_EQ(inserted_parent.GetId(), parent.GetId()); EXPECT_EQ(inserted_parent.GetId(), parent.GetId());
    ...@@ -203,7 +203,7 @@ TEST(test_entity, test_insert_with_property) { // NOLINT ...@@ -203,7 +203,7 @@ TEST(test_entity, test_insert_with_property) { // NOLINT
    std::shared_ptr<transaction::EntityTransactionService::Stub>(nullptr)); std::shared_ptr<transaction::EntityTransactionService::Stub>(nullptr));
    auto entity = Entity(); auto entity = Entity();
    entity.SetId("entity_id"); entity.SetName("entity_name");
    auto prop = Property(); auto prop = Property();
    prop.SetName("prop_name"); prop.SetName("prop_name");
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment