mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gaston Kleiman <gas...@mesosphere.io>
Subject Review Request 65548: Added `Event::Update` and `v1::scheduler::TaskStatus` ostream operators.
Date Wed, 07 Feb 2018 18:58:01 GMT

-----------------------------------------------------------
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


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message