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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-cppinttest
Commits
3f5296ec
Verified
Commit
3f5296ec
authored
Sep 1, 2021
by
Timm Fitschen
Browse files
Options
Downloads
Plain Diff
Merge branch 'dev' into f-value-and-unit
parents
3c2622b6
981ba360
No related branches found
No related tags found
1 merge request
!13
Tests for values and units
Pipeline
#13039
canceled
Sep 3, 2021
Stage: info
Stage: setup
Stage: build
Stage: test
Changes
2
Pipelines
6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
test/test_ccaosdb.cpp
+1
-1
1 addition, 1 deletion
test/test_ccaosdb.cpp
test/test_transaction.cpp
+10
-3
10 additions, 3 deletions
test/test_transaction.cpp
with
11 additions
and
4 deletions
test/test_ccaosdb.cpp
+
1
−
1
View file @
3f5296ec
...
@@ -46,7 +46,7 @@ protected:
...
@@ -46,7 +46,7 @@ protected:
// fill the file that shall be uploaded
// fill the file that shall be uploaded
caosdb
::
transaction
::
FileWriter
writer
(
test_upload_file_1
);
caosdb
::
transaction
::
FileWriter
writer
(
test_upload_file_1
);
std
::
string
buffer
(
1024
,
'c'
);
std
::
string
buffer
(
1024
,
'c'
);
for
(
int
i
=
0
;
i
<
8
;
i
++
)
{
for
(
int
i
=
0
;
i
<
20
;
i
++
)
{
writer
.
write
(
buffer
);
writer
.
write
(
buffer
);
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
test/test_transaction.cpp
+
10
−
3
View file @
3f5296ec
...
@@ -103,6 +103,7 @@ public:
...
@@ -103,6 +103,7 @@ public:
protected
:
protected
:
fs
::
path
test_upload_file_1
;
fs
::
path
test_upload_file_1
;
fs
::
path
test_download_file_1
;
fs
::
path
test_download_file_1
;
size_t
test_file_size_kib
=
20
;
// We should test at least something over 16kiB
// Fixture methods //////////////////////////////////////////////////////////
// Fixture methods //////////////////////////////////////////////////////////
...
@@ -115,7 +116,7 @@ protected:
...
@@ -115,7 +116,7 @@ protected:
// fill the file that shall be uploaded
// fill the file that shall be uploaded
FileWriter
writer
(
test_upload_file_1
);
FileWriter
writer
(
test_upload_file_1
);
std
::
string
buffer
(
1024
,
'c'
);
std
::
string
buffer
(
1024
,
'c'
);
for
(
int
i
=
0
;
i
<
8
;
i
++
)
{
for
(
int
i
=
0
;
i
<
test_file_size_kib
;
i
++
)
{
writer
.
write
(
buffer
);
writer
.
write
(
buffer
);
}
}
}
}
...
@@ -965,14 +966,20 @@ TEST_F(test_transaction, test_file_up_n_download) {
...
@@ -965,14 +966,20 @@ TEST_F(test_transaction, test_file_up_n_download) {
ASSERT_FALSE
(
downloaded_file
.
HasErrors
());
ASSERT_FALSE
(
downloaded_file
.
HasErrors
());
EXPECT_EQ
(
downloaded_file
.
GetLocalPath
().
string
(),
EXPECT_EQ
(
downloaded_file
.
GetLocalPath
().
string
(),
test_download_file_1
.
string
());
test_download_file_1
.
string
());
EXPECT_EQ
(
fs
::
file_size
(
test_upload_file_1
),
fs
::
file_size
(
test_download_file_1
));
// test_download_file_1
FileReader
reader_remote
(
test_
up
load_file_1
);
FileReader
reader_remote
(
test_
down
load_file_1
);
std
::
string
buffer_local
(
1024
,
'c'
);
std
::
string
buffer_local
(
1024
,
'c'
);
std
::
string
buffer_remote
(
1024
,
'c'
);
std
::
string
buffer_remote
(
1024
,
'c'
);
for
(
int
i
=
0
;
i
<
8
;
i
++
)
{
std
::
cout
<<
"Reading kiB chunk"
;
for
(
size_t
i
=
0
;
i
<
test_file_size_kib
;
i
++
)
{
std
::
cout
<<
" #"
<<
i
+
1
<<
"/"
<<
test_file_size_kib
;
reader_remote
.
read
(
buffer_remote
);
reader_remote
.
read
(
buffer_remote
);
EXPECT_EQ
(
buffer_remote
,
buffer_local
);
EXPECT_EQ
(
buffer_remote
,
buffer_local
);
}
}
std
::
cout
<<
std
::
endl
;
}
}
/*
/*
...
...
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