[Nepomuk] Re: Review Request: Setup for integration tests in Nepomuk + a few indexer tests

Vishesh Handa handa.vish at gmail.com
Mon Jul 4 10:47:58 CEST 2011


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/101790/#review4368
-----------------------------------------------------------


Here is what we need to do -

1. The strigi tests should be in their own directory, like the filewatch tests.

2. I don't think kde people will approve of adding binary files like images in the kde-runtime repository. So, we might need to put this code in another repository (nepomuk-tests?). Or create a separate kde-runtime-tests. A separate repository wouldn't work right now, cause you're linking to the source files of the indexer. But I don't think that is required.

We should ideally run the strigi service, and then tell it exactly what do to via dbus. The present dbus interface for the strigi service is quite adequate. It just lacks a signal to inform us when a file has finished indexing. That can easily be added. Do you want me to do it?

---

Btw, thank you very much for working on this. Testing is really important and we've been lacking a formal testing environment for quite some time.


 


nepomuk/CMakeLists.txt
<http://git.reviewboard.kde.org/r/101790/#comment3652>

    I don't think contaminating the global CMakeLists.txt is a good idea. Whatever includes are required should be in the local CMakeLists.txt



nepomuk/services/strigi/nepomukindexer.h
<http://git.reviewboard.kde.org/r/101790/#comment3653>

    I've would prefer something like IndexingJob, which makes it obvious it is an asynchronous process implemented via KJob.



nepomuk/services/strigi/strigiservice.h
<http://git.reviewboard.kde.org/r/101790/#comment3655>

    Is this really required? Couldn't one set the indexing speed via dbus?



nepomuk/services/strigi/strigiservice.cpp
<http://git.reviewboard.kde.org/r/101790/#comment3656>

    Not really required. You've already added the header in strigiservice.h
    
    Plus, it's already there on line 22



nepomuk/tests/CMakeLists.txt
<http://git.reviewboard.kde.org/r/101790/#comment3657>

    It would be nice to have these extra source files only included in strigi test, and not all the tests.



nepomuk/tests/CMakeLists.txt
<http://git.reviewboard.kde.org/r/101790/#comment3658>

    Ditto!



nepomuk/tests/README
<http://git.reviewboard.kde.org/r/101790/#comment3660>

    I'll have to update this. The ontology loader service was merged with the storage service sometime after I wrote this.



nepomuk/tests/indexertests.cpp
<http://git.reviewboard.kde.org/r/101790/#comment3662>

    It would be better if you started the strigi service using startService( .. ), and then tell it to index files over dbus.
    
    Or you could just call the "nepomukindexer" process on the file you want to index, and avoid linking the source files.



nepomuk/tests/indexertests.cpp
<http://git.reviewboard.kde.org/r/101790/#comment3663>

    Does this test pass? Cause from what I remember, it shouldn't pass.



nepomuk/tests/test/filewatch/filewatch.cpp
<http://git.reviewboard.kde.org/r/101790/#comment3661>

    I wrote this test really long ago. From what I remember it never worked. Could you remove it?
    
    Maybe I'll fix it and add it later.


- Vishesh


On June 28, 2011, 7:31 a.m., Paweł Paprota wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/101790/
> -----------------------------------------------------------
> 
> (Updated June 28, 2011, 7:31 a.m.)
> 
> 
> Review request for Nepomuk.
> 
> 
> Summary
> -------
> 
> This is a little ground work for writing integration tests in order to test Nepomuk components in the "real" setup - with D-Bus/socket communication, Virtuoso repository, KConfig configuration running etc.
> 
> Also included are simple tests for indexing of files (see indexertests.cpp).
> 
> See README for details.
> 
> The code is also available here:
> 
> https://github.com/ppawel/kde-runtime/tree/integration-tests
> 
> 
> Diffs
> -----
> 
>   nepomuk/CMakeLists.txt c6a1879 
>   nepomuk/services/strigi/indexscheduler.cpp 56914a7 
>   nepomuk/services/strigi/nepomukindexer.h 08abb2a 
>   nepomuk/services/strigi/nepomukindexer.cpp d796983 
>   nepomuk/services/strigi/strigiservice.h 2eb7eac 
>   nepomuk/services/strigi/strigiservice.cpp 0189679 
>   nepomuk/tests/CMakeLists.txt PRE-CREATION 
>   nepomuk/tests/README PRE-CREATION 
>   nepomuk/tests/indexertests.h PRE-CREATION 
>   nepomuk/tests/indexertests.cpp PRE-CREATION 
>   nepomuk/tests/lib/CMakeLists.txt PRE-CREATION 
>   nepomuk/tests/lib/NepomukTestLibMacros.cmake PRE-CREATION 
>   nepomuk/tests/lib/nepomuk-repository-with-ontologies.tgz PRE-CREATION 
>   nepomuk/tests/lib/nepomukserverrc.in PRE-CREATION 
>   nepomuk/tests/lib/nepomuktest_export.h PRE-CREATION 
>   nepomuk/tests/lib/testbase.h PRE-CREATION 
>   nepomuk/tests/lib/testbase.cpp PRE-CREATION 
>   nepomuk/tests/runNepomukTest.sh PRE-CREATION 
>   nepomuk/tests/test/CMakeLists.txt PRE-CREATION 
>   nepomuk/tests/test/filewatch/CMakeLists.txt PRE-CREATION 
>   nepomuk/tests/test/filewatch/filewatch.h PRE-CREATION 
>   nepomuk/tests/test/filewatch/filewatch.cpp PRE-CREATION 
>   nepomuk/tests/test/identificationtest.h PRE-CREATION 
>   nepomuk/tests/test/identificationtest.cpp PRE-CREATION 
>   nepomuk/tests/testdata/CMakeLists.txt PRE-CREATION 
>   nepomuk/tests/testdata/klogo.png PRE-CREATION 
>   nepomuk/tests/testdata/trollface.jpg PRE-CREATION 
> 
> Diff: http://git.reviewboard.kde.org/r/101790/diff
> 
> 
> Testing
> -------
> 
> Tests should execute with simple "make test". I did however have some problems (segfaults) with sendEvents method that notifies the user that "indexing started for fast search" - I had to disable it locally, I will try to track down the cause of this if it is reproducible.
> 
> 
> Thanks,
> 
> Paweł
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/nepomuk/attachments/20110704/5e0a9963/attachment-0001.htm 


More information about the Nepomuk mailing list