Comments (2)
Most likely reason of this tests flakin is that crud reads data from replica before they have been replicated there.
Need to reproduce this case and check.
If so the following workaraound retrying method for selects can be used:
public class FlakyTestWa {
public static <T> Optional<T> execWithRetry(int tries, Supplier<Optional<T>> fn) {
Optional<T> result;
int c = 0;
do {
result = fn.get();
} while (c < tries && !result.isPresent());
return result;
}
}
...
//first entity must be returned
Optional<BookStore> bookStoreRecord = execWithRetry(3, () ->
bookStoreRepository.findById(BookStoreId.builder()
.bookId(1)
.receivedAt(ts).build())
);
assertThat(bookStoreRecord).hasValueSatisfying(actual -> {
assertThat(actual.getBookId()).isEqualTo(1);
assertThat(actual.getStoreNumber()).isEqualTo(123);
assertThat(actual.getReceivedAt()).isEqualTo(ts);
});
...
from cartridge-springdata.
Should be fixed by b230551
from cartridge-springdata.
Related Issues (20)
- RFC: Redundant code in getPropertyValue
- Update javadoc gh-page in ci
- Add formatting to tables in documentation
- Add checkstyle configuration HOT 1
- Methods for custom mapping setup HOT 1
- List mappig for default types HOT 1
- Bump all dependencies to the latest version HOT 1
- Add CI step for sourcecode security scan
- Add dependency management
- NoSuchMethodError: isCreatorArgument HOT 1
- Add update operation support in SimpleTarantoolRepository
- Synchronise cartridge-java and actual code
- Update testcontainers HOT 1
- Remove unnecessary select in update operation HOT 1
- Problem using @ReadingConverter and @WritingConverter converters in catridge-springdata
- Index search :max() HOT 3
- Bump cartridge-driver to 0.13.0, testcontainers-java-tarantool to 1.0.1
- Update dependencies
- JRE17 support: passing collection parameters into stored procedue fails HOT 3
- AUTO doesn't work with crud response
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cartridge-springdata.