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
24be6922
Verified
Commit
24be6922
authored
3 years ago
by
Timm Fitschen
Browse files
Options
Downloads
Patches
Plain Diff
WIP: cleanup after test_transaction
parent
556fa91d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!5
F update
Pipeline
#11450
failed
3 years ago
Stage: info
Stage: setup
Stage: build
Stage: test
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/test_transaction.cpp
+12
-1
12 additions, 1 deletion
test/test_transaction.cpp
with
12 additions
and
1 deletion
test/test_transaction.cpp
+
12
−
1
View file @
24be6922
...
...
@@ -41,7 +41,18 @@ protected:
void
SetUp
()
override
{}
void
TearDown
()
override
{
// TODO(tf): delete all created entities
const
auto
&
connection
=
caosdb
::
connection
::
ConnectionManager
::
GetDefaultConnection
();
auto
query_transaction
(
connection
->
CreateTransaction
());
query_transaction
->
Query
(
"FIND ENTITY WITH id > 99"
);
query_transaction
->
Execute
();
if
(
query_transaction
->
GetResultSet
().
Size
()
>
0
)
{
for
(
const
Entity
&
entity
:
query_transaction
->
GetResultSet
())
{
auto
delete_transaction
(
connection
->
CreateTransaction
());
delete_transaction
->
DeleteById
(
entity
.
GetId
());
delete_transaction
->
Execute
();
}
}
}
};
...
...
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