Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
X
xta-client-lib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OZG-Cloud
lib
xta-client-lib
Commits
3c607b47
Commit
3c607b47
authored
6 months ago
by
Jan Zickermann
Browse files
Options
Downloads
Patches
Plain Diff
OZG-6891 XtaClientITCase: Remove potentially flaky tests
parent
8bcc8068
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/test/java/de/ozgcloud/xta/client/XtaClientITCase.java
+0
-68
0 additions, 68 deletions
src/test/java/de/ozgcloud/xta/client/XtaClientITCase.java
with
0 additions
and
68 deletions
src/test/java/de/ozgcloud/xta/client/XtaClientITCase.java
+
0
−
68
View file @
3c607b47
...
@@ -220,48 +220,6 @@ class XtaClientITCase {
...
@@ -220,48 +220,6 @@ class XtaClientITCase {
);
);
}
}
@DisplayName
(
"should close messages only if no exception occurs during processing, with no exception for author2"
)
@Test
void
shouldCloseMessagesOnlyIfNoExceptionOccursDuringProcessingWithNoExceptionForAuthor2
()
{
setupClientWithIdentifiers
(
List
.
of
(
READER_CLIENT_IDENTIFIER1
,
READER_CLIENT_IDENTIFIER2
,
READER_CLIENT_IDENTIFIER3
));
processMessageDummy
=
message
->
throwRuntimeExceptionExceptForAuthorIdentifier
(
message
,
AUTHOR_CLIENT_IDENTIFIER2
);
var
transportReports
=
fetchMessages
();
if
(
hasLogLineContaining
(
NO_MESSAGE_CLOSED_WARNING
))
{
// The first listing for reader2 contained sendMessages.get(1) and sendMessages.get(2).
// Since no messages have been closed for this listing, no second listing for reader2 is attempted.
// Therefore, sendMessages.get(3) was not fetched.
assertThat
(
supportCheckedMetadataItems
).
hasSize
(
1
+
2
+
2
);
assertThatMessages
(
processedMessages
).
containExactlyInAnyOrder
(
sendMessages
.
get
(
0
),
sendMessages
.
get
(
1
),
sendMessages
.
get
(
2
),
sendMessages
.
get
(
4
),
sendMessages
.
get
(
5
)
);
assertThatTransportReports
(
transportReports
)
.
reportExactlyFor
(
processedMessages
)
.
haveExactlyGreenStatusFor
(
messageIdBySendIndex
(
4
)
);
}
else
{
// The first listing for reader2 contained sendMessages.get(3).
assertThat
(
supportCheckedMetadataItems
).
hasSize
(
1
+
3
+
2
);
assertThatMessages
(
processedMessages
).
containExactlyInAnyOrder
(
sendMessages
.
get
(
0
),
sendMessages
.
get
(
1
),
sendMessages
.
get
(
2
),
sendMessages
.
get
(
3
),
sendMessages
.
get
(
4
),
sendMessages
.
get
(
5
)
);
assertThatTransportReports
(
transportReports
)
.
reportExactlyFor
(
processedMessages
)
.
haveExactlyGreenStatusFor
(
messageIdBySendIndex
(
3
),
messageIdBySendIndex
(
4
)
);
}
}
@DisplayName
(
"should close messages only if no exception occurs during processing, with no exception for author3"
)
@DisplayName
(
"should close messages only if no exception occurs during processing, with no exception for author3"
)
@Test
@Test
void
shouldCloseMessagesOnlyIfNoExceptionOccursDuringProcessingWithNoExceptionForAuthor3
()
{
void
shouldCloseMessagesOnlyIfNoExceptionOccursDuringProcessingWithNoExceptionForAuthor3
()
{
...
@@ -308,32 +266,6 @@ class XtaClientITCase {
...
@@ -308,32 +266,6 @@ class XtaClientITCase {
.
haveExactlyGreenStatusFor
(
messageIdBySendIndex
(
0
),
messageIdBySendIndex
(
1
),
messageIdBySendIndex
(
2
));
.
haveExactlyGreenStatusFor
(
messageIdBySendIndex
(
0
),
messageIdBySendIndex
(
1
),
messageIdBySendIndex
(
2
));
}
}
@DisplayName
(
"should process messages only if supported, with support for author2"
)
@Test
void
shouldProcessMessagesOnlyIfSupportedWithSupportForAuthor2
()
{
setupClientWithIdentifiers
(
List
.
of
(
READER_CLIENT_IDENTIFIER1
,
READER_CLIENT_IDENTIFIER2
,
READER_CLIENT_IDENTIFIER3
));
isSupportedDummy
=
metaData
->
metaData
.
authorIdentifier
().
value
().
equals
(
AUTHOR_CLIENT_IDENTIFIER2
.
value
());
var
transportReports
=
fetchMessages
();
if
(
hasLogLineContaining
(
NO_MESSAGE_CLOSED_WARNING
))
{
// Case: sendMessages.get(3) was not fetched.
assertThat
(
supportCheckedMetadataItems
).
hasSize
(
1
+
2
+
2
);
assertThatMessages
(
processedMessages
).
containExactlyInAnyOrder
(
sendMessages
.
get
(
4
));
assertThatTransportReports
(
transportReports
)
.
reportExactlyFor
(
processedMessages
)
.
haveExactlyGreenStatusFor
(
messageIdBySendIndex
(
4
));
}
else
{
// Case: sendMessages.get(3) was fetched.
assertThat
(
supportCheckedMetadataItems
).
hasSize
(
1
+
3
+
2
);
assertThatMessages
(
processedMessages
).
containExactlyInAnyOrder
(
sendMessages
.
get
(
3
),
sendMessages
.
get
(
4
));
assertThatTransportReports
(
transportReports
)
.
reportExactlyFor
(
processedMessages
)
.
haveExactlyGreenStatusFor
(
messageIdBySendIndex
(
3
),
messageIdBySendIndex
(
4
));
}
}
@DisplayName
(
"should process messages only if supported, with support for author3"
)
@DisplayName
(
"should process messages only if supported, with support for author3"
)
@Test
@Test
void
shouldProcessMessagesOnlyIfSupportedWithSupportForAuthor3
()
{
void
shouldProcessMessagesOnlyIfSupportedWithSupportForAuthor3
()
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment