forked from awaitility/awaitility
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchangelog.txt
179 lines (160 loc) · 12.4 KB
/
changelog.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
Changelog next version
----------------------
* Fixed issue in org.awaitility.Duration which made it depend on Java 7 features (issue 50)
Changelog 2.0.0 (2016-06-17)
----------------------------
* Fixed issue with static fibonacci method that took an offset as argument which was not used
* Condition awaiter thread does now have a meaningful name based on the await alias (if defined) (thanks to Alex Simkin for pull request)
* Added atLeast support, for example:
await().atLeast(1, SECONDS).and().atMost(2, SECONDS).until(value(), equalTo(1));
Big thanks to Oleksii for helping out (issue 38)
* Awaitility now requires Java 6 (Java 5 was previously required)
* Updates to the groovy module. org.awaitility.groovy.AwailitySupport, org.awaitility.groovy.AwaitilityGroovyBridge
and org.awaitility.groovy.AwaitilityTrait have been deprecated. The reason is that both AwaitilitySupport and AwaitilityTrait have
one big flaws. When not used for one test class, these test cases might or might not fail, depending on execution order. For this
reason an AwaitilityExtensionModule has been created which automatically add a new method until(Closure) to the ConditionFactory.
So with groovy 2 and above, there is effectively no need any more to use AwaitilitySupport, AwaitilityTrait or AwaitilityGroovyBridge.
All you need to do is add awaitility-groovy to your classpath and you are good. Big thanks to Tobias Schulte for pull request.
* Improved Scala support. Previously only boolean expressions could be passed to "until" in Scala but now you can pass any supported type. For example you can now use assertj conditions:
await until { assertThat(c1.count() + c2.count(), is(6)) }
(thanks to Grzegorz Ligas for pull request)
* Changed package name from "com.jayway.awaitility" to "org.awaitility"
* Changed groupId from "com.jayway.awaitility" to "org.awaitility"
Changelog 1.7.0 (2015-11-27)
----------------------------
* Deadlock detection is no longer applied on platform that doesn't support it such as Android (issue 30)
* ConditionEvaluationLogger now logs the poll interval of the evaluated condition
* Deprecations: Duration.SAME_AS_POLL_INTERVAL is deprecated since it's no longer used. It'll be removed in a future release.
* Introducing non-fixed poll intervals. PollInterval is now a first-class concept (represented by a com.jayway.awaitility.pollinterval.PollInterval)
and it's non possible use non-fixed poll intervals. By default Awaitility uses the FixedPollInterval (default 100 ms just as in previous version)
but you can now change another type of poll interval. Awaitility ships with three different PollInterval implementations:
Fixed (default), Fibonacci and Iterative. To use the Fibonacci poll interval you can do like this:
with().pollInterval(fibonacci()).await().until(..);
this will generate a poll interval of 1, 1, 2, 3, 5, 8, 13, .. . Note that Duration.ZERO is used as start value for all non-fixed poll intervals
(for fixed poll intervals the poll delay is equal to the duration of the FixedPollInterval for backward compatible reasons). (issue 36)
* Improvement to Duration (com.jayway.awaitility.Duration). You can invoke make use of the new methods plus, minus, multiply, divide. For example:
new Duration(5, SECONDS).plus(17, MILLISECONDS); // Will return a new Duration of 5017 milliseconds.
* Added Duration.ONE_MILLISECOND
* Added ability to wait for Runnable (void) conditions that declares check exceptions. For example if we have the following method:
public void something() throws Exception { ... }
We can't just do:
await().until(() -> something());
since something might throw a checked exception (and the lambda expression thus can't be treated as a Runnable). To work-around this
make use of the "matches" method declared in com.jayway.awaitility.Awaitility:
await().until(matches(() -> something()));
Big thanks to Tomasz Kowalczewski and Marcin Zajączkowski for helping out. (issue 32)
Changelog 1.6.5 (2015-09-27)
----------------------------
* Added ability to ignore exceptions while evaluating a condition. This is useful if you're waiting for something that throws exceptions
as an intermediate value before the final state is reached. As an example take Spring's SocketUtils class that allows you to find an
available TCP port in a given range. It will throw an exception if no port is available in the given range. So let's say we know that the ports
in the given range are currently not available but we want to wait for them to be available. In that case we need to ignore the exceptions thrown
by SocketUtils.
For example:
given().ignoreExceptions().await().until(() -> SocketUtils.findAvailableTcpPort(x,y));
This instruct Awaitility to ignore all caught exceptions during condition evaluation. Exceptions will be treated as evaluating to false.
The test will not fail upon an exception matching the supplied exception type, unless it times out. You can also ignore specific exceptions:
given().ignoreException(IllegalStateException.class).await().until(() -> SocketUtils.findAvailableTcpPort(x,y));
or use Hamcrest matcher:
given().ignoreExceptionsMatching(instanceOf(RuntimeException.class)).await().until(() -> SocketUtils.findAvailableTcpPort(x,y));
or a predicate:
given().ignoreExceptionsMatching(e -> e.getMessage().startsWith("Could not find an available")).await().until(something());
* Updated the Groovy version to 2.4.4 from 2.3.7 in the Groovy extension.
* Updated the Scala version to 2.11.3 from 2.11.7 in the Scala extension.
Changelog 1.6.4 (2015-09-14)
---------------------------
* Updated to JUnit 4.12
* Allow parallel test execution with MethodCallRecorder (thanks to Tom Bujok for pull request)
Changelog 1.6.3 (2014-11-28)
----------------------------
* Awaitility now gracefully handles cases when findDeadLockedThreads() is not supported on certain JVM:s (thanks to Jeremie Jost for pull request).
Changelog 1.6.2 (2014-10-15)
----------------------------
* awaitility-java8 project was renamed to awaitility-java8-test to better describe its purpose.
* Support for automatic deadlock detection. The awaitility stracktrace will now include deadlock information if a deadlock was found (thanks to Tobias Bieniek for pull request).
* Condition evaluation listeners now supports non Hamcrest based conditions (thanks to Tomasz Kalkosiński for the help).
* Condition evaluation listeners now expose condition alias
* Improved error messages for lambda- and Runnable conditions
* Upgraded Scala dependency to version 2.11.3.
* Upgraded Groovy dependency to version 2.3.7.
* Support for Groovy Traits. Implement com.jayway.awaitility.groovy.AwaitilityTrait instead of using the com.jayway.awaitility.groovy.AwaitilitySupport mixin.
Changelog 1.6.1 (2014-07-03)
----------------------------
* Added support for condition evaluation listeners. A listener is called each time a Hamcrest-based condition has been evaluated by Awaitility. For example:
with().
conditionEvaluationListener(condition -> System.out.printf("%s (elapsed time %dms, remaining time %dms)\n", condition.getDescription(), condition.getElapsedTimeInMS(), condition.getRemainingTimeInMS())).
await().atMost(Duration.TEN_SECONDS).until(new CountDown(5), is(equalTo(0)));
will print the following to the console:
com.jayway.awaitility.AwaitilityJava8Test$CountDown expected (<0> or a value less than <0>) but was <5> (elapsed time 101ms, remaining time 1899ms)
com.jayway.awaitility.AwaitilityJava8Test$CountDown expected (<0> or a value less than <0>) but was <4> (elapsed time 204ms, remaining time 1796ms)
com.jayway.awaitility.AwaitilityJava8Test$CountDown expected (<0> or a value less than <0>) but was <3> (elapsed time 306ms, remaining time 1694ms)
com.jayway.awaitility.AwaitilityJava8Test$CountDown expected (<0> or a value less than <0>) but was <2> (elapsed time 407ms, remaining time 1593ms)
com.jayway.awaitility.AwaitilityJava8Test$CountDown expected (<0> or a value less than <0>) but was <1> (elapsed time 508ms, remaining time 1492ms)
com.jayway.awaitility.AwaitilityJava8Test$CountDown reached its end value of (<0> or a value less than <0>) (elapsed time 610ms, remaining time 1390ms)
Big thanks to Maciej Gawinecki for the help.
* Added primitive values to matching check when doing await().untilTrue(..) and await().untilFalse(..) (issue 26)
* Fixed issue that caused poll interval to be used as poll delay (issue 29).
Changelog 1.6.0 (2014-04-23)
----------------------------
* Support for using Fest Assert and AssertJ: await().until(() -> assertThat(fakeRepository.getValue()).isEqualTo(1));
* Better Java 8 support
* Updated Groovy module to use Groovy 2.2.2
* Updated CgLib to version 3.1
Changelog 1.5.0 (2014-01-27)
----------------------------
* Updated Objenesis dependency to version 2.1
* Added support for returning the last polled value from Awaitility when using proxy conditions. For example: int y = await().untilCall(to(x).y(), greaterThan(2)); (issue 13).
* Updated Groovy dependency to 2.2.1.
* Non backward-compatible change: Awaitility now throws org.awaitility.core.ConditionTimeoutException instead of java.concurrent.TimeoutException. The reason is that ConditionTimeoutException is a runtime exception and the latter couldn't be caught since "await" didn't declare the checked exception. (issue 24)
* Awaitility now catches all uncaught throwables from each thread and propagates them to the main thread (issue 22).
* Improved error messages when using aliased await conditions (issue 21).
Changelog 1.4.0 (2013-11-26)
----------------------------
* Updated Groovy to version 2.2.0
* Fixed a bug that sometimes accidentally used poll interval as poll delay
* Updated to Hamcrest 1.3
* Updated Scala to version 2.10.3
Changelog 1.3.5 (2013-02-16)
----------------------------
* Added untilFalse method to make it easier to wait until an atomic boolean is false: await().untilFalse(myAtomicBoolean);
* Removed all checked exceptions from Awaitility so that you don't need to catch them (issue 19).
* Improved error message when trying to proxy final methods (issue 10).
Changelog 1.3.4 (2012-02-13)
----------------------------
* Updated Scala module to use Scala 2.9.1
* Now uses the poll interval as delay _between_ scheduled tasks. This means that if the supplier takes more time to return the value than what's defined by the poll interval the supplier won't be called twice (or more) (issue 12).
* Now supports usage of more flexible Hamcrest matchers (thanks to Xavier Dury for the patch) (issue 15).
* Upgraded Hamcrest to version 1.2.1.
Changelog 1.3.3
---------------
* Added support for AtomicInteger, AtomicLong, AtomicReference and AtomicBoolean, e.g. await().untilAtomic(atomic, equalTo(2)).
Changelog 1.3.2
---------------
* Fixed an issue where poll interval overrode the poll delay.
* Awaitility now throws IllegalStateException when timeout is less than or equal to the poll interval or poll delay.
* Improved error messages when using field suppliers (e.g. await().until( fieldIn(object).ofType(int.class), is(2) );) when timeout occurs.
Changelog 1.3.1
---------------
* Groovy support! Syntax is: await().until { something() > 5 }
* Improved error messages in Scala DSL.
* Add SPI support for extension DSL:s which allows them to provide error messages.
Changelog 1.3
-------------
* MethodCallRecorder generates an exception on getLastXXX if no method call have been recorded.
* MethodCallRecorder is reset after retrieving last calls and on Awaitility.reset
* Added basic support for Scala functions
* Added a fieldIn method to Awaitility which allows you to build a supplier using a field, e.g. await().until(fieldIn(object).ofType(int.class), equalTo(1));
* Backward incompatible refactoring: until(callTo(..)) has been renamed to untilCall(to(..)). This to allow for extension DSL's (such as the Scala DSL) to work appropriately.
* Fixed a bug that failed to set Awaitility to catch uncaught exceptions on reset
Changelog version 1.2.1
-----------------------
* Changed ProxyCreator to use the standard InvocationHandler interface
* Refactored for even better error messages.
Changelog version 1.2
---------------------
* Improved error messages for timeouts to include actual value.
Changelog version 1.1
---------------------
* Major internal refactoring to allow for better default error messages when a timeout occurs.
* Support for using proxy-based conditions (i.e. using Awaitility.callTo) when testing Eclipse applications.
* Calls to the method Object.finalize should not be recorded as this is part of gc.