-
Notifications
You must be signed in to change notification settings - Fork 3k
[ISSUE #4235]supports generation of mock data on request #4236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| String expression = params.get(0); | ||
| CONTEXT.setVariable("req", mockRequest); | ||
| Object val = PARSER.parseExpression(expression).getValue(CONTEXT); | ||
| EvaluationContext context = initContext(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you need to initialize each time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generation mock data on request in multithreading is not safe, this commit slove this preoblem .but it isnt a good method .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here,no thread safety .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you mean ,thread safety is not required here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes~
Codecov Report
@@ Coverage Diff @@
## master #4236 +/- ##
============================================
- Coverage 69.58% 69.58% -0.01%
- Complexity 7362 7369 +7
============================================
Files 992 993 +1
Lines 27885 27926 +41
Branches 2473 2473
============================================
+ Hits 19403 19431 +28
- Misses 7003 7017 +14
+ Partials 1479 1478 -1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Make sure that:
./mvnw clean install -Dmaven.javadoc.skip=true.implement #4235
Function Display
responseContent:
{ "name": ${expression|#req.json.name}, "country":${expression|#req.json.address.country}, "header_name":${expression|#req.headers[header_name]}, "method":${expression|#req.method}, "json_id":${expression|#req.json.id}, "query_id":${expression|#req.queries[id]}, "uri":${expression|#req.uri} }