I think I could try and go through all tests and try find which ones produce
anything outside “target” and compile a list.
Then we know which tests need refactoring.
Chris
Von: 谭新宇 <1025599...@qq.com.INVALID>
Datum: Freitag, 15. März 2024 um 09:58
An: dev@iotdb.apache.org
Betreff: Re: [DISCUSS] Please don't write output of tests to the root directory
of a module.
Hi, Chris
+1 for the fact that generating test output anywhere outside the target
directory is really a bad idea.
It looks like the package name for this test changed on March 10th, which may
have contributed to its failure. Maybe we can check all the tests to see if
there are similar cases, otherwise there may be such problems in the future.
Best
———
Xinyu Tan
> 2024年3月15日 16:44,Christofer Dutz 写道:
>
> Hi Xinyu,
>
> I would assume that there were a lot of changes and updates in the rat-plugin
> (the one that was failing the build).
> So, it could have been that this was all ok till a new version of rat was
> being used.
>
> However that doesn’t change the fact that generating test output anywhere
> outside the target directory is really a bad idea.
>
> Chris
>
> Von: 谭新宇 <1025599...@qq.com.INVALID>
> Datum: Freitag, 15. März 2024 um 09:38
> An: dev@iotdb.apache.org
> Betreff: Re: [DISCUSS] Please don't write output of tests to the root
> directory of a module.
> Hi, Chris
>
> I checked the UT and it looks like it hasn't been changed in two or three
> years. We have been running into unexpected errors in the Jenkins
> environment, such as data cleaning problems, which could lead to similar
> errors.
>
> Naturally, the license header check is also included in Github CI continuous
> integration, but it seems that github's environment is clean enough that
> there is no problem.
>
> Maybe we need to investigate the Jenkins environment cleanup problem.
>
> Best
>
> Xinyu Tan
>
>
>
>> 2024年3月15日 05:22,Christofer Dutz 写道:
>>
>> So,
>>
>> for the last few days we had failing builds on Jenkins again, as it was
>> continuously complaining about two CSV files not having the right license
>> headers.
>> Funny thing is, these tests only appear if you build with tests as one test
>> created them.
>>
>> It’s a super-bad idea to write the output of unit-tests or integration tests
>> into the root of a module, as exactly stuff like this happens.
>>
>> Please be sure to write them into some disposable directory underneath
>> “target”.
>>
>> I have changed that one test now and hopefully we’ll have fresh SNAPSHOT
>> version when I wake up tomorrow.
>>
>> This stupid little thing has caused a cascade of problems for me today which
>> made me waste most of my working day today :-/
>>
>> So please: Pay a bit more attention to where you write stuff.
>>
>> Chris
>>