hmpatel / rest-assured

Automatically exported from code.google.com/p/rest-assured
0 stars 0 forks source link

Attribute with circular reference in Spring Mock Mvc #359

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
I attached an AttributeTest to reproduce the problem

What is the expected output? What do you see instead?
There's a stack overflow when the object is getting serialized.  For request 
attributes, I would expect no serialization to be necessary.  My use case is 
unit testing a Spring REST controller.  A filter inserts an object with a 
circular reference into the request as an attribute.  In my unit test, I wish 
to insert a test fixture into the request as an object.

What version of the product are you using? On what operating system?
2.3.3 using Mac OS X 10.7 and Java 1.7

Original issue reported on code.google.com by jason.be...@gmail.com on 5 Oct 2014 at 8:29

Attachments:

GoogleCodeExporter commented 9 years ago
I was able to do what I wanted by implementing 
org.springframework.test.web.servlet.request.MockHttpServletRequestBuilder and 
using that to insert the request attribute.  Now I'm not sure what the 
attribute feature is for.  Feel free to reject this issue if you wish.

Original comment by jason.be...@gmail.com on 5 Oct 2014 at 9:10