Add unittest to check if commiting the same change twice works
ClosedPublic

Authored by bruns on Nov 27 2018, 7:57 PM.

Details

Summary

The fileindexer is only aware some terms/properties *may* have changed,
but may also submit a document again which is identical to the current
DB contents.
Ideally, the engine should catch these cases and remove any noops from
the transaction.

Test Plan

ctest

Diff Detail

Repository
R293 Baloo
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
bruns created this revision.Nov 27 2018, 7:57 PM
Restricted Application added projects: Frameworks, Baloo. · View Herald TranscriptNov 27 2018, 7:57 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
bruns requested review of this revision.Nov 27 2018, 7:57 PM

Patch does not apply for me on top of current master:

    Ignore these untracked files and continue? [y/N] y

 INFO  Base commit is not in local repository; trying to fetch.
Created and checked out branch arcpatch-D17199.


    This diff is against commit 260e35e79a80eaf0003c5053f1c1ee9fe965b6bc, but
    the commit is nowhere in the working copy. Try to apply it against the
    current working copy state? (1ee2ccc824be8e8c223c7364d0d9e8f7eb2d1874)
    [Y/n] y

Checking patch autotests/integration/writetransactiontest.cpp...
error: while searching for:
    }
}

QTEST_MAIN(WriteTransactionTest)

#include "writetransactiontest.moc"

error: patch failed: autotests/integration/writetransactiontest.cpp:395
Applying patch autotests/integration/writetransactiontest.cpp with 1 reject...
Hunk #1 applied cleanly.
Rejected hunk #2.

 Patch Failed! 
Usage Exception: Unable to apply patch!

Is there some unmarked dependency?

bruns added a comment.Dec 1 2018, 3:14 PM

Conceptually, its independent of D17198, but there is a single line not matching in the context

Try again with currennt master

ngraham accepted this revision.Dec 1 2018, 3:26 PM

Yep, it applies now that the other patch is in. Works great, looks good.

This revision is now accepted and ready to land.Dec 1 2018, 3:26 PM
This revision was automatically updated to reflect the committed changes.