Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-cppinttest
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
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
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-cppinttest
Commits
96856cde
Verified
Commit
96856cde
authored
1 year ago
by
Daniel Hornung
Browse files
Options
Downloads
Patches
Plain Diff
MAINT: Changelog and simplified code a bit.
parent
6cc7f6f7
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!29
fix async timeout
Pipeline
#41146
failed
1 year ago
Stage: info
Stage: build
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.md
+2
-0
2 additions, 0 deletions
CHANGELOG.md
test/test_async.cpp
+6
-4
6 additions, 4 deletions
test/test_async.cpp
with
8 additions
and
4 deletions
CHANGELOG.md
+
2
−
0
View file @
96856cde
...
...
@@ -19,4 +19,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
*
Fixed failing async test.
### Security
This diff is collapsed.
Click to expand it.
test/test_async.cpp
+
6
−
4
View file @
96856cde
...
...
@@ -55,15 +55,17 @@ TEST(test_async, retrieve_non_existing) {
// 1000ms are not always sufficient, when there is very high pipeline load.
auto
count
=
1000
;
auto
code
=
transaction
->
GetStatus
().
GetCode
();
do
{
// wait some time
std
::
this_thread
::
sleep_for
(
10ms
);
// DONT call WaitForIt -> the transaction finishes in the background
status
=
transaction
->
GetStatus
();
}
while
(
--
count
>
0
&&
status
.
GetCode
()
==
StatusCode
::
EXECUTING
);
EXPECT_EQ
(
status
.
GetCode
(),
TransactionStatus
::
TRANSACTION_ERROR
().
GetCode
());
ASSERT_EQ
(
status
.
GetCode
(),
StatusCode
::
GENERIC_TRANSACTION_ERROR
);
code
=
transaction
->
GetStatus
().
GetCode
();
}
while
(
--
count
>
0
&&
code
==
StatusCode
::
EXECUTING
);
ASSERT_GT
(
count
,
0
)
<<
"ERROR: Timeout while waiting for transaction."
;
EXPECT_EQ
(
code
,
TransactionStatus
::
TRANSACTION_ERROR
().
GetCode
());
ASSERT_EQ
(
code
,
StatusCode
::
GENERIC_TRANSACTION_ERROR
);
const
auto
&
result_set
=
transaction
->
GetResultSet
();
...
...
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