You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to test scenarios where database writes take longer than expected. For example, after saving a piece of data, then navigate to a dashboard to view. If writing to database takes a long time, the dashboard might not be able to retrieve the newly added data.
If I use "timing" config, it only delay the response but writing to Mirage DB still happens in real time. Can you add a timing config to db mutation methods e.g. create, update, save?
The text was updated successfully, but these errors were encountered:
You can use delayRouteHnadler in regular setup like such:
this.post("/movies",(schema,request)=>{returndelayRouteHandler(()=>{constattrs=JSON.parse(request.requestBody);returnschema.movies.create(attrs);},1000);//delay db operation by 1 second});
I want to test scenarios where database writes take longer than expected. For example, after saving a piece of data, then navigate to a dashboard to view. If writing to database takes a long time, the dashboard might not be able to retrieve the newly added data.
If I use "timing" config, it only delay the response but writing to Mirage DB still happens in real time. Can you add a timing config to db mutation methods e.g. create, update, save?
The text was updated successfully, but these errors were encountered: