You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Gaston Kleiman <ga...@mesosphere.io> on 2018/02/07 18:58:01 UTC
Review Request 65548: Added `Event::Update` and
`v1::scheduler::TaskStatus` ostream operators.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/65548/
-----------------------------------------------------------
Review request for mesos, Alexander Rukletsov, Greg Mann, Qian Zhang, and Vinod Kone.
Repository: mesos
Description
-------
This operators make gtest print a human-readable representation of the
protos on test failures.
Diffs
-----
include/mesos/v1/mesos.hpp d4c354ab596a6ea361f2fe45afa46089f8c1a543
include/mesos/v1/scheduler/scheduler.hpp 2fdd8f265d8dd5e3a334055ab8777a175688f620
src/v1/mesos.cpp 8abeae06e0fa87b50933df1c222ad4724a0b0116
Diff: https://reviews.apache.org/r/65548/diff/1/
Testing
-------
Example test failure without the patch:
```
Unexpected mock function call - returning directly.
Function call: update(0x7ffedfa94eb0, @0x7f8638002c30 32-byte object <50-92 EA-29 87-7F 00-00 00-00 00-00 00-00 00-00 01-00 00-00 00-00 00-00 60-30 00-38 86-7F 00-00>)
Google Mock tried the following 8 expectations, but none matched:
../../src/tests/default_executor_tests.cpp:3315: tried expectation #0: EXPECT_CALL(*scheduler, update(_, AllOf( TaskStatusUpdateTaskIdEq(sleepTaskInfo1), TaskStatusUpdateStateEq(v1::TASK_ERROR))))...
[...]
) and (task status update state eq TASK_ERROR)
Actual: 32-byte object <50-92 EA-29 87-7F 00-00 00-00 00-00 00-00 00-00 01-00 00-00 00-00 00-00 60-30 00-38 86-7F 00-00>
Expected: to be called once
Actual: never called - unsatisfied and active
```
After applying the patch:
```
Unexpected mock function call - returning directly.
Function call: update(0x7ffc6b036a20, @0x7f4af4000bb0 TASK_STARTING (Status UUID: f379eb50-1163-442a-8e30-a0c2f5247575) for task 'sleepTask1')
Google Mock tried the following 8 expectations, but none matched:
../../src/tests/default_executor_tests.cpp:3315: tried expectation #0: EXPECT_CALL(*scheduler, update(_, AllOf( TaskStatusUpdateTaskIdEq(sleepTaskInfo1), TaskStatusUpdateStateEq(v1::TASK_ERROR))))...
[...]
) and (task status update state eq TASK_ERROR)
Actual: TASK_STARTING (Status UUID: f379eb50-1163-442a-8e30-a0c2f5247575) for task 'sleepTask1'
```
Thanks,
Gaston Kleiman
Re: Review Request 65548: Added `Event::Update` and
`v1::scheduler::TaskStatus` ostream operators.
Posted by Joseph Wu <jo...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/65548/#review197214
-----------------------------------------------------------
Ship it!
LGTM.
src/v1/mesos.cpp
Lines 604 (patched)
<https://reviews.apache.org/r/65548/#comment277350>
For debugging purposes, it may also help to include the `source` and `reason` fields (if present). And maybe even `slave_id`.
- Joseph Wu
On Feb. 7, 2018, 10:57 a.m., Gaston Kleiman wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/65548/
> -----------------------------------------------------------
>
> (Updated Feb. 7, 2018, 10:57 a.m.)
>
>
> Review request for mesos, Alexander Rukletsov, Greg Mann, Qian Zhang, and Vinod Kone.
>
>
> Repository: mesos
>
>
> Description
> -------
>
> This operators make gtest print a human-readable representation of the
> protos on test failures.
>
>
> Diffs
> -----
>
> include/mesos/v1/mesos.hpp d4c354ab596a6ea361f2fe45afa46089f8c1a543
> include/mesos/v1/scheduler/scheduler.hpp 2fdd8f265d8dd5e3a334055ab8777a175688f620
> src/v1/mesos.cpp 8abeae06e0fa87b50933df1c222ad4724a0b0116
>
>
> Diff: https://reviews.apache.org/r/65548/diff/2/
>
>
> Testing
> -------
>
> Example test failure without the patch:
>
> ```
> Unexpected mock function call - returning directly.
> Function call: update(0x7ffedfa94eb0, @0x7f8638002c30 32-byte object <50-92 EA-29 87-7F 00-00 00-00 00-00 00-00 00-00 01-00 00-00 00-00 00-00 60-30 00-38 86-7F 00-00>)
> Google Mock tried the following 8 expectations, but none matched:
>
> ../../src/tests/default_executor_tests.cpp:3315: tried expectation #0: EXPECT_CALL(*scheduler, update(_, AllOf( TaskStatusUpdateTaskIdEq(sleepTaskInfo1), TaskStatusUpdateStateEq(v1::TASK_ERROR))))...
> [...]
> ) and (task status update state eq TASK_ERROR)
> Actual: 32-byte object <50-92 EA-29 87-7F 00-00 00-00 00-00 00-00 00-00 01-00 00-00 00-00 00-00 60-30 00-38 86-7F 00-00>
> Expected: to be called once
> Actual: never called - unsatisfied and active
> ```
>
> After applying the patch:
>
> ```
> Unexpected mock function call - returning directly.
> Function call: update(0x7ffc6b036a20, @0x7f4af4000bb0 TASK_STARTING (Status UUID: f379eb50-1163-442a-8e30-a0c2f5247575) for task 'sleepTask1')
> Google Mock tried the following 8 expectations, but none matched:
>
> ../../src/tests/default_executor_tests.cpp:3315: tried expectation #0: EXPECT_CALL(*scheduler, update(_, AllOf( TaskStatusUpdateTaskIdEq(sleepTaskInfo1), TaskStatusUpdateStateEq(v1::TASK_ERROR))))...
> [...]
> ) and (task status update state eq TASK_ERROR)
> Actual: TASK_STARTING (Status UUID: f379eb50-1163-442a-8e30-a0c2f5247575) for task 'sleepTask1'
> ```
>
>
> Thanks,
>
> Gaston Kleiman
>
>
Re: Review Request 65548: Added `Event::Update` and
`v1::scheduler::TaskStatus` ostream operators.
Posted by Gaston Kleiman <ga...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/65548/
-----------------------------------------------------------
(Updated Feb. 12, 2018, 3:11 p.m.)
Review request for mesos, Alexander Rukletsov, Greg Mann, Qian Zhang, and Vinod Kone.
Changes
-------
Added more fields.
Repository: mesos
Description
-------
This operators make gtest print a human-readable representation of the
protos on test failures.
Diffs (updated)
-----
include/mesos/v1/mesos.hpp d4c354ab596a6ea361f2fe45afa46089f8c1a543
include/mesos/v1/scheduler/scheduler.hpp 2fdd8f265d8dd5e3a334055ab8777a175688f620
src/v1/mesos.cpp 8abeae06e0fa87b50933df1c222ad4724a0b0116
Diff: https://reviews.apache.org/r/65548/diff/3/
Changes: https://reviews.apache.org/r/65548/diff/2-3/
Testing
-------
Example test failure without the patch:
```
Unexpected mock function call - returning directly.
Function call: update(0x7ffedfa94eb0, @0x7f8638002c30 32-byte object <50-92 EA-29 87-7F 00-00 00-00 00-00 00-00 00-00 01-00 00-00 00-00 00-00 60-30 00-38 86-7F 00-00>)
Google Mock tried the following 8 expectations, but none matched:
../../src/tests/default_executor_tests.cpp:3315: tried expectation #0: EXPECT_CALL(*scheduler, update(_, AllOf( TaskStatusUpdateTaskIdEq(sleepTaskInfo1), TaskStatusUpdateStateEq(v1::TASK_ERROR))))...
[...]
) and (task status update state eq TASK_ERROR)
Actual: 32-byte object <50-92 EA-29 87-7F 00-00 00-00 00-00 00-00 00-00 01-00 00-00 00-00 00-00 60-30 00-38 86-7F 00-00>
Expected: to be called once
Actual: never called - unsatisfied and active
```
After applying the patch:
```
Unexpected mock function call - returning directly.
Function call: update(0x7ffc6b036a20, @0x7f4af4000bb0 TASK_STARTING (Status UUID: f379eb50-1163-442a-8e30-a0c2f5247575) for task 'sleepTask1')
Google Mock tried the following 8 expectations, but none matched:
../../src/tests/default_executor_tests.cpp:3315: tried expectation #0: EXPECT_CALL(*scheduler, update(_, AllOf( TaskStatusUpdateTaskIdEq(sleepTaskInfo1), TaskStatusUpdateStateEq(v1::TASK_ERROR))))...
[...]
) and (task status update state eq TASK_ERROR)
Actual: TASK_STARTING (Status UUID: f379eb50-1163-442a-8e30-a0c2f5247575) for task 'sleepTask1'
```
Thanks,
Gaston Kleiman
Re: Review Request 65548: Added `Event::Update` and
`v1::scheduler::TaskStatus` ostream operators.
Posted by Qian Zhang <zh...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/65548/#review197257
-----------------------------------------------------------
Ship it!
Ship It!
- Qian Zhang
On Feb. 8, 2018, 2:57 a.m., Gaston Kleiman wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/65548/
> -----------------------------------------------------------
>
> (Updated Feb. 8, 2018, 2:57 a.m.)
>
>
> Review request for mesos, Alexander Rukletsov, Greg Mann, Qian Zhang, and Vinod Kone.
>
>
> Repository: mesos
>
>
> Description
> -------
>
> This operators make gtest print a human-readable representation of the
> protos on test failures.
>
>
> Diffs
> -----
>
> include/mesos/v1/mesos.hpp d4c354ab596a6ea361f2fe45afa46089f8c1a543
> include/mesos/v1/scheduler/scheduler.hpp 2fdd8f265d8dd5e3a334055ab8777a175688f620
> src/v1/mesos.cpp 8abeae06e0fa87b50933df1c222ad4724a0b0116
>
>
> Diff: https://reviews.apache.org/r/65548/diff/2/
>
>
> Testing
> -------
>
> Example test failure without the patch:
>
> ```
> Unexpected mock function call - returning directly.
> Function call: update(0x7ffedfa94eb0, @0x7f8638002c30 32-byte object <50-92 EA-29 87-7F 00-00 00-00 00-00 00-00 00-00 01-00 00-00 00-00 00-00 60-30 00-38 86-7F 00-00>)
> Google Mock tried the following 8 expectations, but none matched:
>
> ../../src/tests/default_executor_tests.cpp:3315: tried expectation #0: EXPECT_CALL(*scheduler, update(_, AllOf( TaskStatusUpdateTaskIdEq(sleepTaskInfo1), TaskStatusUpdateStateEq(v1::TASK_ERROR))))...
> [...]
> ) and (task status update state eq TASK_ERROR)
> Actual: 32-byte object <50-92 EA-29 87-7F 00-00 00-00 00-00 00-00 00-00 01-00 00-00 00-00 00-00 60-30 00-38 86-7F 00-00>
> Expected: to be called once
> Actual: never called - unsatisfied and active
> ```
>
> After applying the patch:
>
> ```
> Unexpected mock function call - returning directly.
> Function call: update(0x7ffc6b036a20, @0x7f4af4000bb0 TASK_STARTING (Status UUID: f379eb50-1163-442a-8e30-a0c2f5247575) for task 'sleepTask1')
> Google Mock tried the following 8 expectations, but none matched:
>
> ../../src/tests/default_executor_tests.cpp:3315: tried expectation #0: EXPECT_CALL(*scheduler, update(_, AllOf( TaskStatusUpdateTaskIdEq(sleepTaskInfo1), TaskStatusUpdateStateEq(v1::TASK_ERROR))))...
> [...]
> ) and (task status update state eq TASK_ERROR)
> Actual: TASK_STARTING (Status UUID: f379eb50-1163-442a-8e30-a0c2f5247575) for task 'sleepTask1'
> ```
>
>
> Thanks,
>
> Gaston Kleiman
>
>