extraction-framework icon indicating copy to clipboard operation
extraction-framework copied to clipboard

create a test for server ignore lists

Open jimkont opened this issue 10 years ago • 6 comments

We need to create a test for validating contributions to the server ignore list and enable tests on the server module (only for now)

related PRs that caused problem: https://github.com/dbpedia/extraction-framework/pull/331 , https://github.com/dbpedia/extraction-framework/pull/329 , https://github.com/dbpedia/extraction-framework/pull/348 related fixes : https://github.com/dbpedia/extraction-framework/pull/351 & https://github.com/dbpedia/extraction-framework/pull/347

jimkont avatar Mar 06 '15 08:03 jimkont

I think there's already this one. I ran it to check my edits in https://github.com/dbpedia/extraction-framework/pull/359 and it successfully detected the missing second linefeed at the end of the file.

It's just not integrated as a Junit test. Maybe I can add this to the PR? Just not sure if we should keep the save call there.

Nono314 avatar Mar 08 '15 18:03 Nono314

cool, didn't notice that! So we should convert it to JUnit and adapt pom.xml to run the server tests on build. This is also a gsoc warmup task and a student can pick it up. It's up to you if you want to implement this

jimkont avatar Mar 09 '15 09:03 jimkont

Oh, I didn't remember that. Nice. :-)

I think I wrote that as simple way to test the ignore list I/O code. That's why I included save. If git told me the files hadn't change, I knew that load and save worked. A bit of a hack, but it worked well.

I agree that converting it to a unit test makes sense. Or maybe even better: keep the current test in the main method, add a new one as a unit test method. The current test is for the load / save code. (Still useful if we ever change that code. Maybe add a launcher in pom.xml.) The new test checks the files, not the code. Loading them should be enough. We can drop the save.

One little problem: The code contains a relative path: "src/main/statistics/" This means the test only works if extraction-framework/server is the current directory, which may not always be the case. Maybe there is a better way to find the files?

jcsahnwaldt avatar Mar 09 '15 14:03 jcsahnwaldt

But it would be much better to get rid of the ignore lists. In that case, we won't need any tests. https://github.com/dbpedia/mappings-tracker/issues/39

jcsahnwaldt avatar Mar 09 '15 14:03 jcsahnwaldt

I agree with Johna and think we should get rid of the Ignorelists. It would be also good to include/tag it as an advanced warm-up task or as a part of the ideas for 5.4 or 5.5 (depending on which gets trough). @jimkont what's your opinion on getting rid of the ignorelists as in dbpedia/mappings-tracker#39 ?

alexandrutodor avatar Mar 09 '15 15:03 alexandrutodor

I agree to get rid of them and put them on the wiki. We can create a separate issue for this. I thought of this as an easy task for GSoC students to get familiar with the code and test changes until/if we migrate

jimkont avatar Mar 09 '15 20:03 jimkont