Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [hudson-dev] testMissingWorkspaceGives200 in hudson-test-harness

On 19 Aug 2011, at 10:20, Geoff Waymark wrote:

> Hi Stuart,
> 
> The fix for HUDSON-8950 looks correct to me, 404 is the sensible code for this isn't it? I was just about to verify that fix for 2.1.1.

That's what I thought, in which case the test should be changed to check for 404 instead of 200.

> Looks like one of those cases were a test was written to assert what happens, not what >should< happen. Can anyone think of a good reason why 200 (OK ) is better than 404 (Not Found) when the workspace is missing?
> 
> Thanks,
> Geoff
> 
> Stuart McCulloch wrote:
>> Hi folks,
>> 
>> I tried running the hudson-test-harness against 2.1.1-SNAPSHOT (currently its parent is still set to 2.1.0-SNAPSHOT) and get one failure:
>> 
>>   testMissingWorkspaceGives200(hudson.model.AbstractProjectTest)  Time elapsed: 9.796 sec  <<< FAILURE!
>>   junit.framework.AssertionFailedError: expected:<200> but was:<404>
>> 
>> Looking at the recent changes to AbstractProjectTest I see the following:
>> 
>>   commit e5b7d316090fdaa05bcddd0b7ef5189c4d857718
>>   Author: akozak <antkozak@xxxxxxxxx>
>>   Date:   Fri Aug 5 11:25:21 2011 +0300
>> 
>>       Updated broken test, it was broken with HUDSON-8950 fix.
>> 
>> Which changed the test to expect a status result of 200 instead of 404 when there's an attempt to access a file from a missing workspace.
>> But HUDSON-8950 is supposed to fix the missing workspace request to return 404 instead of 200 (which it appears to do, at least for me).
>> 
>> So is the test out of step, or is the fix for HUDSON-8950 incorrect? Should it expect 404 or 200?
>> 
>> --
>> Cheers, Stuart
>> _______________________________________________
>> hudson-dev mailing list
>> hudson-dev@xxxxxxxxxxx
>> http://dev.eclipse.org/mailman/listinfo/hudson-dev
>>  
> 
> _______________________________________________
> hudson-dev mailing list
> hudson-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/hudson-dev



Back to the top