Hide Forgot
Description of problem: This may be only a spec test problem, reporting just so that I don't forget. After change [2] I am seeing random spec test failures of owner_product_resource_spec:"updates individual product fields". If the sleep in [1] on line 48 is uncommented, it will fail every time. When product is updated using OwnerProductResource.updateProduct (@PUT), the ProductAttribute.updated is changed. This is probably because of the @Cascade({ CascadeType.ALL }) and @PreUpdate protected void onUpdate(). [1] https://github.com/candlepin/candlepin/blob/2ffbc5111254a642863e0235494573fac182a454/server/spec/owner_product_resource_spec.rb#L48 [2] https://github.com/candlepin/candlepin/commit/5e130cdc130403b8ff72590ddf8383ebc9e806dc Version-Release number of selected component (if applicable): How reproducible: always Steps to Reproduce: 1. Uncomment line [1] and run spec test Actual results: 1) Owner Product Resource updates individual product fields Failure/Error: prod.attributes.should == temp_attributes expected: [{"created"=>"2016-10-20T05:52:05+0000", "updated"=>"2016-10-20T05:52:07+0000", "name"=>"type", "value"=>"SVC"}] got: [{"created"=>"2016-10-20T05:52:05+0000", "updated"=>"2016-10-20T05:52:09+0000", "name"=>"type", "value"=>"SVC"}] (using ==) Diff: @@ -1,5 +1,5 @@ [{"created"=>"2016-10-20T05:52:05+0000", - "updated"=>"2016-10-20T05:52:07+0000", + "updated"=>"2016-10-20T05:52:09+0000", "name"=>"type", "value"=>"SVC"}] Expected results: Spec test pass Additional info: