Apache Gora
  1. Apache Gora
  2. GORA-153

gora-cassandra does not correctly handle DELETED State for MAP

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.2
    • Fix Version/s: 0.2.1
    • Component/s: gora-cassandra
    • Labels:
      None

      Description

      gora-cassandra does not correctly handle State.DELETED.

      It makes gora-cassandra test fail.

      Tests run: 28, Failures: 2, Errors: 9, Skipped: 0, Time elapsed: 18.081 sec <<< FAILURE!
      testUpdate(org.apache.gora.cassandra.store.TestCassandraStore) Time elapsed: 0.889 sec <<< FAILURE!
      junit.framework.AssertionFailedError: expected:<3> but was:<7>
      at junit.framework.Assert.fail(Assert.java:50)
      at junit.framework.Assert.failNotEquals(Assert.java:287)
      at junit.framework.Assert.assertEquals(Assert.java:67)
      at junit.framework.Assert.assertEquals(Assert.java:199)
      at junit.framework.Assert.assertEquals(Assert.java:205)
      at org.apache.gora.store.DataStoreTestUtil.testUpdateWebPage(DataStoreTestUtil.java:310)
      at org.apache.gora.store.DataStoreTestBase.testUpdate(DataStoreTestBase.java:267)

      for (int j = 0; j < urls.length; j += 2)

      { webPage.putToOutlinks(new Utf8(anchor + j), new Utf8(urls[j])); } // webPage.getOutlinks().size() is 4.

      webPage.getOutlinks().clear(); // webPage.getOutlinks().size() should be 0.

      for (int j = 1; j < urls.length; j += 2) { webPage.putToOutlinks(new Utf8(anchor + j), new Utf8(urls[j])); }

      // webPage.getOutlinks().size() should be 3.

      dataStore.flush(); // It ignores DELETED State, so 7 are written.
      WebPage webPage = dataStore.get(urls[i]);

      Assert.assertEquals(count, webPage.getOutlinks().size()); // 3 != 7 .. ERROR

      1. GORA-153.patch
        6 kB
        Kazuomi Kashii

        Issue Links

          Activity

          Kazuomi Kashii created issue -
          Kazuomi Kashii made changes -
          Field Original Value New Value
          Attachment GORA-153.patch [ 12537306 ]
          Kazuomi Kashii made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Lewis John McGibbney made changes -
          Fix Version/s 0.2.1 [ 12322496 ]
          Fix Version/s 0.3 [ 12317954 ]
          Lewis John McGibbney made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Kazuomi Kashii made changes -
          Link This issue relates to GORA-182 [ GORA-182 ]
          Gavin made changes -
          Workflow jira [ 12717391 ] no-reopen-closed, patch-avail [ 12735375 ]

            People

            • Assignee:
              Unassigned
              Reporter:
              Kazuomi Kashii
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development