Skip to content

What's new in 1.1.2

jandudek edited this page Oct 7, 2015 · 6 revisions

Disabling the requests recording

The verification feature in Jadler is implemented by recording all incoming http requests (including their bodies). In some very specific corner cases this implementation can cause troubles. For example imagine a long running performance test using Jadler for stubbing some remote http service. Since such a test can issue thousands or even millions of requests the memory consumption probably would affect the test results (either by a performance slowdown or even crashes). In this specific scenarios you should consider disabling the incoming requests recording:

@Before
public void setUp() {
    initJadler().that()
            .skipsRequestsRecording();
}

Once the request recording has been disabled, calling verifyThatRequest() will result in an IllegalStateException. Please note you should ignore this option almost every time you use Jadler unless you are really convinced about it. The default behavior is suitable for most use cases.

Using Jadler and jUnit with a timeout defined

A bug preventing usage of Jadler facade in conjunction with a jUnit test with a defined timeout value (@Test(timeout=10000L)) fixed.