[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] Use of ProvisionException.REPOSITORY_NOT_FOUND?

Which tests fail? Can you point out the failure, or attach a patch somewhere with your changes that cause test failures? The only important distinction is that a NOT_FOUND exception will cause the repository manager to keep trying with another repository type, whereas other exceptions will result in the repository manager not trying another repository type (because the repository is there, but there were problems reading it). See the javadoc in MetadataRepositoryFactory#load for details.

Henrik Lindberg <henrik.lindberg@xxxxxxxxxxxxxx>
Sent by: p2-dev-bounces@xxxxxxxxxxx

03/11/2009 10:01 PM

Please respond to
P2 developer discussions <p2-dev@xxxxxxxxxxx>

P2 developer discussions <p2-dev@xxxxxxxxxxx>
[p2-dev] Use of ProvisionException.REPOSITORY_NOT_FOUND?

When testing repository loading and using invalid URI's to test errors  
- tests fail if the Status.getCode() is not REPOSITORY_NOT_FOUND.
I saw one comment that said that "this status code is expected, since  
all others will be logged".

I wonder how the status codes should be used? There are codes for  
ACCESS denied, INVALID location, etc. Wouldn't it be more appropriate  
to use those when the
cause is known? I now have statuses with more details working, and I  
selected what I thought were suitable codes from ProvisionException  
only to find that tests fail...

Can someone shed some light on how it is supposed to work?

Henrik Lindberg

p2-dev mailing list