Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
asapo
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
Terraform modules
Analyze
Contributor 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
Joao Alvim Oliveira Dias De Almeida
asapo
Commits
13fcff12
Commit
13fcff12
authored
5 years ago
by
Sergey Yakubov
Browse files
Options
Downloads
Patches
Plain Diff
fix for windows
parent
2c71f189
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
receiver/unittests/receiver_mocking.h
+11
-2
11 additions, 2 deletions
receiver/unittests/receiver_mocking.h
receiver/unittests/test_request_handler_db_writer.cpp
+3
-3
3 additions, 3 deletions
receiver/unittests/test_request_handler_db_writer.cpp
with
14 additions
and
5 deletions
receiver/unittests/receiver_mocking.h
+
11
−
2
View file @
13fcff12
...
...
@@ -53,8 +53,17 @@ class MockRequest: public Request {
MOCK_CONST_METHOD0
(
GetBeamtimeId
,
const
std
::
string
&
());
MOCK_CONST_METHOD0
(
GetMetaData
,
const
std
::
string
&
());
MOCK_CONST_METHOD0
(
GetBeamline
,
const
std
::
string
&
());
MOCK_CONST_METHOD0
(
GetOpCode
,
asapo
::
Opcode
());
MOCK_CONST_METHOD0
(
GetCustomData
,
const
asapo
::
CustomRequestData
&
());
MOCK_CONST_METHOD0
(
GetOpCode
,
asapo
::
Opcode
());
mutable
asapo
::
CustomRequestData
t
;
const
asapo
::
CustomRequestData
&
GetCustomData
()
const
override
{
auto
a
=
GetCustomData_t
();
t
[
0
]
=
a
[
0
];
t
[
1
]
=
a
[
1
];
return
t
;
};
MOCK_CONST_METHOD0
(
GetCustomData_t
,
const
uint64_t
*
());
MOCK_CONST_METHOD0
(
GetMessage
,
const
char
*
());
MOCK_METHOD1
(
SetBeamtimeId
,
void
(
std
::
string
));
MOCK_METHOD1
(
SetBeamline
,
void
(
std
::
string
));
...
...
This diff is collapsed.
Click to expand it.
receiver/unittests/test_request_handler_db_writer.cpp
+
3
−
3
View file @
13fcff12
...
...
@@ -71,7 +71,7 @@ class DbWriterHandlerTests : public Test {
uint64_t
expected_id
=
15
;
uint64_t
expected_subset_id
=
15
;
uint64_t
expected_subset_size
=
2
;
asapo
::
CustomRequestData
expected_custom_data
{
expected_subset_id
,
expected_subset_size
};
uint64_t
expected_custom_data
[
2
]
{
expected_subset_id
,
expected_subset_size
};
void
SetUp
()
override
{
GenericRequestHeader
request_header
;
request_header
.
data_id
=
2
;
...
...
@@ -140,8 +140,8 @@ void DbWriterHandlerTests::ExpectRequestParams(asapo::Opcode op_code) {
;
if
(
op_code
==
asapo
::
Opcode
::
kOpcodeTransferSubsetData
)
{
EXPECT_CALL
(
*
mock_request
,
GetCustomData
()).
Times
(
2
).
WillRepeatedly
(
Return
Ref
(
expected_custom_data
))
EXPECT_CALL
(
*
mock_request
,
GetCustomData
_t
()).
Times
(
2
).
WillRepeatedly
(
Return
(
expected_custom_data
))
;
}
}
...
...
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