Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-cpplib
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-cpplib
Commits
7c25e6d4
Commit
7c25e6d4
authored
3 years ago
by
Daniel Hornung
Browse files
Options
Downloads
Patches
Plain Diff
TEST: Failing test.
parent
fc8b443b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!18
FIX: Transaction::GetResultSet() now always returns a good reference
Pipeline
#12548
failed
3 years ago
Stage: info
Stage: setup
Stage: test
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
test/CMakeLists.txt
+1
-0
1 addition, 0 deletions
test/CMakeLists.txt
test/test_issues.cpp
+46
-0
46 additions, 0 deletions
test/test_issues.cpp
with
47 additions
and
0 deletions
test/CMakeLists.txt
+
1
−
0
View file @
7c25e6d4
...
...
@@ -26,6 +26,7 @@ set(test_cases
test_entity
test_file_transmission
test_info
test_issues
test_list_properties
test_protobuf
test_transaction
...
...
This diff is collapsed.
Click to expand it.
test/test_issues.cpp
0 → 100644
+
46
−
0
View file @
7c25e6d4
/*
* This file is a part of the CaosDB Project.
*
* Copyright (C) 2021 Daniel Hornung <d.hornung@indiscale.com>
* Copyright (C) 2021 IndiScale GmbH <info@indiscale.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include
"caosdb/configuration.h"
// for InsecureConnectionConfig...
#include
"caosdb/connection.h"
// for Connection
#include
"caosdb/exceptions.h"
// for ConnectionError
#include
"caosdb/status_code.h"
#include
"caosdb/transaction.h"
// for Transaction
#include
<gtest/gtest-message.h>
// for Message
#include
<gtest/gtest-test-part.h>
// for SuiteApiResolver, TestPa...
#include
<gtest/gtest_pred_impl.h>
// for Test, TestInfo, TEST
namespace
caosdb
::
transaction
{
using
caosdb
::
configuration
::
InsecureConnectionConfiguration
;
using
caosdb
::
connection
::
Connection
;
TEST
(
test_issues
,
test_issue_11
)
{
const
auto
*
host
=
"localhost"
;
auto
configuration
=
InsecureConnectionConfiguration
(
host
,
8000
);
Connection
connection
(
configuration
);
auto
transaction
=
connection
.
CreateTransaction
();
ASSERT_EQ
(
transaction
->
GetResultSet
().
size
(),
0
);
transaction
->
RetrieveById
(
"100"
);
ASSERT_EQ
(
StatusCode
::
EXECUTING
,
transaction
->
ExecuteAsynchronously
());
// Trying to obtain ResultSet while it is still empty.
ASSERT_EQ
(
transaction
->
GetResultSet
().
size
(),
0
);
}
}
// namespace caosdb::transaction
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