OK, found it: the issue in EditorTest is that the SimpleBar that the
setUserName is applied to and the one in the SimpleFoo's barField are
not the same instances!

The instances are initialized in response to the finishTestAndReset call
from RequestBatcherTest, which explains the differing behavior when this
test is commented out (or moved to run later): in this case, everything
is initialized from the call to findSimpleFooById at the beginning of
EditorTest#test.

The real issue is actually that finisTestAndReset resets SimpleFoo
before resetting SimpleBar, so when SimpleFoo asks for
SimpleBar.getSingleton() it gets the "previous instance", and then the
SimpleBars are reinitialized.
When everything is initialized in EditorTest#test() through
findSimpleFooById, the SimpleFoo's barField and SimpleBar are the same
instances. It might be that they differ in subsequent tests but that
just does not seem to be an issue then.

Inverting the order of the reset calls in finishAndResetTest fixes the
issue.

I also simplified the changes to AbstractRequestContext (adding a
"diff'ing" state to the AbstractRequestContext/RequestState that's then
used in the various AutoBean Categories to
a) avoid auto-editing proxies (what was done by temporarily locking the
context in patchsets 1 to 6)
b) change the equals() behavior for EntityProxies (fixing issue 5952)

http://gwt-code-reviews.appspot.com/1601806/

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to