Hi there! Is there any easy way to implement Delay...
# wiremock-java
r
Hi there! Is there any easy way to implement DelayDistribution? We are using static json mock in are team, and i want to add a beta-distribution delay. Is it possible to add this maybe through ResponseTransformer? Or ill need to fork/file a contrib issue?
t
I’ve never considered implementing a custom DelayDistribution by attaching it from a transformer, but it should work I think
r
Could you advise a correct way to do this other then using a transformer? Idealy i'd like to end up using it like lognormal:
Copy code
"delayDistribution": {
            "type": "beta",
            "alpha": 2,
            "beta": 5,
            "min": 50,
            "max": 1200
        }
This distribution offers a more irl delay
t
That’d require a core change, either just to add the distribution directly, or more ideally to add an extension point. However, I wouldn’t abandon the transformer idea immediately as you could still make it JSON configurable as you’ve shown above via the
transformerParameters
attribute.
👀 1
r
Ok, I'll take a look in to it. Thank you!