Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 310160 - tests DeltaVerifier shouldn't reset the verifier if there's no delta
Summary: tests DeltaVerifier shouldn't reset the verifier if there's no delta
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Resources (show other bugs)
Version: 3.6   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 3.7 M3   Edit
Assignee: John Arthorne CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-22 13:10 EDT by James Blackburn CLA
Modified: 2010-10-07 05:26 EDT (History)
0 users

See Also:


Attachments
patch 1 (973 bytes, patch)
2010-04-22 13:10 EDT, James Blackburn CLA
john.arthorne: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James Blackburn CLA 2010-04-22 13:10:47 EDT
Created attachment 165802 [details]
patch 1

Trivial patch attached.

The issue is that if the test is expecting a delta, and there isn't one, the verifier is incorrectly reset (i.e. it's no longer expecting changes and is clean/correct). 
The result is a subsequent call to DeltaVerifierBuilder#isDeltaValid() incorrectly reports the delta as correct.
Comment 1 John Arthorne CLA 2010-10-06 14:48:22 EDT
Applying this patch doesn't seem to introduce any new test failures, so I assume this wasn't masking a bug in the core.resources implementation?
Comment 2 John Arthorne CLA 2010-10-06 14:48:43 EDT
Patch applied in HEAD.
Comment 3 James Blackburn CLA 2010-10-07 05:26:47 EDT
(In reply to comment #1)
> Applying this patch doesn't seem to introduce any new test failures, so I
> assume this wasn't masking a bug in the core.resources implementation?

Yes, that's right.  I discovered this when writing another test which was incorrectly passing with no delta.