-
Notifications
You must be signed in to change notification settings - Fork 283
fix: allowing sorting Contract Definitions by creation date #5020
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
a135a72
86c621c
bf44068
af5b9bd
7172a21
8b49c1e
c5cee4e
54d5d0a
4f5ec4d
c957151
72e1c59
c3f9e1c
6456ff3
6d8995b
52d6903
3480eff
895e709
8ccb40c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -34,6 +34,7 @@ | |
| import java.util.LinkedHashMap; | ||
| import java.util.List; | ||
| import java.util.UUID; | ||
| import java.util.concurrent.atomic.AtomicInteger; | ||
| import java.util.stream.Stream; | ||
|
|
||
| import static io.restassured.http.ContentType.JSON; | ||
|
|
@@ -128,7 +129,9 @@ void queryContractDefinitions_sortByCreatedDate(ManagementEndToEndTestContext co | |
| var id1 = UUID.randomUUID().toString(); | ||
| var id2 = UUID.randomUUID().toString(); | ||
| var id3 = UUID.randomUUID().toString(); | ||
| Stream.of(id1, id2, id3).forEach(id -> store.save(createContractDefinition(id).createdAt(System.nanoTime()).build())); | ||
| var createdAtTime = 1000L; | ||
| var increment = new AtomicInteger(0); | ||
| Stream.of(id1, id2, id3).forEach(id -> store.save(createContractDefinition(id).createdAt(createdAtTime + increment.getAndIncrement()).build())); | ||
|
|
||
| var content = """ | ||
|
||
| { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use an AtomicLong and have it as one operation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, simplified in here.