You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Joseph Wu <jo...@mesosphere.io> on 2018/11/29 00:04:22 UTC

Review Request 69474: WIP: Added tests for agent/executor heartbeating.

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/69474/
-----------------------------------------------------------

Review request for mesos, Benno Evers, Gastón Kleiman, and Greg Mann.


Bugs: MESOS-7564
    https://issues.apache.org/jira/browse/MESOS-7564


Repository: mesos


Description
-------

This adds two separate tests which check if the Agent sends heartbeats
to HTTP executors, and if the HTTP executor driver sends heartbeats
to the agent.


Diffs
-----

  src/tests/executor_http_api_tests.cpp a635e1a3c228b52f47ba81a67753ea49ce092143 


Diff: https://reviews.apache.org/r/69474/diff/1/


Testing
-------

```
cmake --build . --target check
src/mesos-tests --gtest_filter="*Heartbeat*" --verbose --gtest_repeat=-1 --gtest_break_on_failure
```

The new `HeartbeatCalls` test is still a bit flaky (roughly one failure in ~50,000 iterations), so I'm marking this test as WIP.


Thanks,

Joseph Wu


Re: Review Request 69474: Added tests for agent/executor heartbeating.

Posted by Mesos Reviewbot Windows <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/69474/#review210965
-----------------------------------------------------------



FAIL: Some of the unit tests failed. Please check the relevant logs.

Reviews applied: `['69463', '69472', '69473', '69474']`

Failed command: `Start-MesosCITesting`

All the build artifacts available at: http://dcos-win.westus2.cloudapp.azure.com/artifacts/mesos-reviewbot-testing/2659/mesos-review-69474

Relevant logs:

- [mesos-tests-cmake.log](http://dcos-win.westus2.cloudapp.azure.com/artifacts/mesos-reviewbot-testing/2659/mesos-review-69474/logs/mesos-tests-cmake.log):

```
         d:\dcos\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8\src\c\src\zookeeper.c(3426): warning C4996: 'strerror': This function or variable may be unsafe. Consider using strerror_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8-build\zookeeper.vcxproj] [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8.vcxproj]
         d:\dcos\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8\src\c\src\zookeeper.c(3500): warning C4996: 'inet_ntoa': Use inet_ntop() or InetNtop() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8-build\zookeeper.vcxproj] [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8.vcxproj]
         d:\dcos\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8\src\c\src\zookeeper.c(3501): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8-build\zookeeper.vcxproj] [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8.vcxproj]
         d:\dcos\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8\src\c\src\zookeeper.c(3479): warning C4101: 'addrstr': unreferenced local variable [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8-build\zookeeper.vcxproj] [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8.vcxproj]
         d:\dcos\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8\src\c\src\recordio.c(170): warning C4267: '=': conversion from 'size_t' to 'int32_t', possible loss of data [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8-build\zookeeper.vcxproj] [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8.vcxproj]
         d:\dcos\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8\src\c\src\mt_adaptor.c(496): warning C4244: '=': conversion from 'time_t' to 'int32_t', possible loss of data [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8-build\zookeeper.vcxproj] [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8.vcxproj]
         d:\dcos\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8\src\c\src\winport.c(256): warning C4090: 'function': different 'const' qualifiers [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8-build\zookeeper.vcxproj] [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8.vcxproj]
         d:\dcos\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8\src\c\src\winport.c(166): warning C4716: 'pthread_cond_broadcast': must return a value [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8-build\zookeeper.vcxproj] [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8.vcxproj]
         d:\dcos\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8\src\c\src\winport.c(205): warning C4716: 'pthread_cond_wait': must return a value [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8-build\zookeeper.vcxproj] [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8.vcxproj]
         d:\dcos\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8\src\c\src\cli.c(124): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8-build\cli.vcxproj] [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8.vcxproj]
         d:\dcos\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8\src\c\src\cli.c(128): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8-build\cli.vcxproj] [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8.vcxproj]
         d:\dcos\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8\src\c\src\cli.c(279): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8-build\cli.vcxproj] [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8.vcxproj]
         d:\dcos\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8\src\c\src\cli.c(301): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8-build\cli.vcxproj] [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8.vcxproj]
         d:\dcos\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8\src\c\src\cli.c(368): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8-build\cli.vcxproj] [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8.vcxproj]
         d:\dcos\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8\src\c\src\cli.c(372): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8-build\cli.vcxproj] [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8.vcxproj]
         d:\dcos\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8\src\c\src\cli.c(512): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8-build\cli.vcxproj] [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8.vcxproj]
         d:\dcos\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8\src\c\src\cli.c(543): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8-build\cli.vcxproj] [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8.vcxproj]
         d:\dcos\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8\src\c\src\cli.c(548): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8-build\cli.vcxproj] [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8.vcxproj]
         d:\dcos\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8\src\c\src\cli.c(569): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8-build\cli.vcxproj] [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8.vcxproj]


       "D:\DCOS\mesos\src\tests\mesos-tests.vcxproj" (default target) (1) ->
       (ClCompile target) -> 
         d:\dcos\mesos\mesos\src\tests\executor_http_api_tests.cpp(1176): error C3480: 'mesos::internal::tests::executor': a lambda capture variable must be from an enclosing function scope [D:\DCOS\mesos\src\tests\mesos-tests.vcxproj]

    172 Warning(s)
    1 Error(s)

Time Elapsed 00:28:16.77
```

- Mesos Reviewbot Windows


On Nov. 30, 2018, 8:03 a.m., Joseph Wu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/69474/
> -----------------------------------------------------------
> 
> (Updated Nov. 30, 2018, 8:03 a.m.)
> 
> 
> Review request for mesos, Benno Evers, Gastón Kleiman, and Greg Mann.
> 
> 
> Bugs: MESOS-7564
>     https://issues.apache.org/jira/browse/MESOS-7564
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This adds two separate tests which check if the Agent sends heartbeats
> to HTTP executors, and if the HTTP executor driver sends heartbeats
> to the agent.
> 
> 
> Diffs
> -----
> 
>   src/tests/executor_http_api_tests.cpp a635e1a3c228b52f47ba81a67753ea49ce092143 
> 
> 
> Diff: https://reviews.apache.org/r/69474/diff/3/
> 
> 
> Testing
> -------
> 
> ```
> cmake --build . --target check
> src/mesos-tests --gtest_filter="*Heartbeat*" --verbose --gtest_repeat=-1 --gtest_break_on_failure
> ```
> 
> 
> Thanks,
> 
> Joseph Wu
> 
>


Re: Review Request 69474: Added tests for agent/executor heartbeating.

Posted by Greg Mann <gr...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/69474/#review211056
-----------------------------------------------------------


Fix it, then Ship it!





src/tests/executor_http_api_tests.cpp
Lines 31-32 (patched)
<https://reviews.apache.org/r/69474/#comment295943>

    These can be removed.



src/tests/executor_http_api_tests.cpp
Lines 973-974 (patched)
<https://reviews.apache.org/r/69474/#comment295915>

    Newline between these lines?



src/tests/executor_http_api_tests.cpp
Lines 1121 (patched)
<https://reviews.apache.org/r/69474/#comment295937>

    s/heartbeats are/heartbeats are sent/



src/tests/executor_http_api_tests.cpp
Lines 1171 (patched)
<https://reviews.apache.org/r/69474/#comment295939>

    s/Calls/calls/ for consistency with "events".



src/tests/executor_http_api_tests.cpp
Lines 1226 (patched)
<https://reviews.apache.org/r/69474/#comment295942>

    If we don't break this value out into a header now, let's leave a TODO here to update later.


- Greg Mann


On Nov. 30, 2018, 12:03 a.m., Joseph Wu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/69474/
> -----------------------------------------------------------
> 
> (Updated Nov. 30, 2018, 12:03 a.m.)
> 
> 
> Review request for mesos, Benno Evers, Gastón Kleiman, and Greg Mann.
> 
> 
> Bugs: MESOS-7564
>     https://issues.apache.org/jira/browse/MESOS-7564
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This adds two separate tests which check if the Agent sends heartbeats
> to HTTP executors, and if the HTTP executor driver sends heartbeats
> to the agent.
> 
> 
> Diffs
> -----
> 
>   src/tests/executor_http_api_tests.cpp a635e1a3c228b52f47ba81a67753ea49ce092143 
> 
> 
> Diff: https://reviews.apache.org/r/69474/diff/3/
> 
> 
> Testing
> -------
> 
> ```
> cmake --build . --target check
> src/mesos-tests --gtest_filter="*Heartbeat*" --verbose --gtest_repeat=-1 --gtest_break_on_failure
> ```
> 
> 
> Thanks,
> 
> Joseph Wu
> 
>


Re: Review Request 69474: Added tests for agent/executor heartbeating.

Posted by Mesos Reviewbot Windows <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/69474/#review211083
-----------------------------------------------------------



PASS: Mesos patch 69474 was successfully built and tested.

Reviews applied: `['69463', '69472', '69473', '69474']`

All the build artifacts available at: http://dcos-win.westus2.cloudapp.azure.com/artifacts/mesos-reviewbot-testing/2676/mesos-review-69474

- Mesos Reviewbot Windows


On Dec. 6, 2018, 1:26 a.m., Joseph Wu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/69474/
> -----------------------------------------------------------
> 
> (Updated Dec. 6, 2018, 1:26 a.m.)
> 
> 
> Review request for mesos, Benno Evers, Gastón Kleiman, and Greg Mann.
> 
> 
> Bugs: MESOS-7564
>     https://issues.apache.org/jira/browse/MESOS-7564
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This adds two separate tests which check if the Agent sends heartbeats
> to HTTP executors, and if the HTTP executor driver sends heartbeats
> to the agent.
> 
> 
> Diffs
> -----
> 
>   src/tests/executor_http_api_tests.cpp a635e1a3c228b52f47ba81a67753ea49ce092143 
>   src/tests/mesos.hpp c08e7e6c1dbc3dd9eb980868e43368c0a423c3ee 
> 
> 
> Diff: https://reviews.apache.org/r/69474/diff/4/
> 
> 
> Testing
> -------
> 
> ```
> cmake --build . --target check
> src/mesos-tests --gtest_filter="*Heartbeat*" --verbose --gtest_repeat=-1 --gtest_break_on_failure
> ```
> 
> 
> Thanks,
> 
> Joseph Wu
> 
>


Re: Review Request 69474: Added tests for agent/executor heartbeating.

Posted by Mesos Reviewbot Windows <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/69474/#review211182
-----------------------------------------------------------



FAIL: Some of the unit tests failed. Please check the relevant logs.

Reviews applied: `['69463', '69472', '69473', '69474']`

Failed command: `Start-MesosCITesting`

All the build artifacts available at: http://dcos-win.westus2.cloudapp.azure.com/artifacts/mesos-reviewbot-testing/2693/mesos-review-69474

Relevant logs:

- [mesos-tests.log](http://dcos-win.westus2.cloudapp.azure.com/artifacts/mesos-reviewbot-testing/2693/mesos-review-69474/logs/mesos-tests.log):

```
I1211 02:37:15.163028  7732 executor.cpp:922] Sending SIGTERM to process tree at pid 96602:37:15.163028  1584 master.cpp:11065] Removing task f673b950-c557-427d-8dce-9b9a97035501 with resources cpus(allocated: *):4; mem(allocated: *):2048; disk(allocated: *):1024; ports(allocated: *):[31000-32000] of framework 6c9fcc20-eac8-4e6c-90e1-b79a795de9a7-0000 on agent 6c9fcc20-eac8-4e6c-90e1-b79a795de9a7-S0 at slave(463)@192.10.1.4:64631 (windows-01.chtsmhjxogyevckjfayqqcnjda.xx.internal.cloudapp.net)
I1211 02:37:15.166033  1584 master.cpp:1277] Agent 6c9fcc20-eac8-4e6c-90e1-b79a795de9a7-S0 at slave(463)@192.10.1.4:64631 (windows-01.chtsmhjxogyevckjfayqqcnjda.xx.internal.cloudapp.net) disconnected
I1211 02:37:15.166033  1584 master.cpp:3280] Disconnecting agent 6c9fcc20-eac8-4e6c-90e1-b79a795de9a7-S0 at slave(463)@192.10.1.4:64631 (windows-01.chtsmhjxogyevckjfayqqcnjda.xx.internal.cloudapp.net)
I1211 02:37:15.166033  1584 master.cpp:3299] Deactivating agent 6c9fcc20-eac8-4e6c-90e1-b79a795de9a7-S0 at slave(463)@192.10.1.4:64631 (windows-01.chtsmhjxogyevckjfayqqcnjda.xx.internal.cloudapp.net)
I1211 02:37:15.167024 13936 hierarchical.cpp:357] Removed framework 6c9fcc20-eac8-4e6c-90e1-b79a795de9a7-0000
I1211 02:37:15.167024 13936 hierarchical.cpp:801] Agent 6c9fcc20-eac8-4e6c-90e1-b79a795de9a7-S0 deactivated
I1211 02:37:15.167024  6600 containerizer.cpp:2463] Destroying container 7346239a-02a5-4f0a-bc21-bcb693639e96 in RUNNING state
I1211 02:37:15.168032  6600 containerizer.cpp:3130] Transitioning the state of container 7346239a-02a5-4f0a-bc21-bcb693639e96 from RUNNING to DESTROYING
I1211 02:37:15.168032  6600 launcher.cpp:161] Asked to destroy container 7346239a-02a5-4f0a-bc21-bcb693639e96
W1211 02:37:15.170037 13532 process.cpp:1423] Failed to recv on socket WindowsFD::Type::SOCKET=8552 to peer '192.10.1.4:50078': IO failed with error code: The specified network name is no longer available.

W1211 02:37:15.170037 13532 process.cpp:838] Failed to recv on socket WindowsFD::Type::SOCKET=9144 to peer '192.10.1.4:50079': IO failed with error code: The specified network name is no longer available.

I1211 02:37:15.[       OK ] IsolationFlag/MemoryIsolatorTest.ROOT_MemUsage/0 (682 ms)
[----------] 1 test from IsolationFlag/MemoryIsolatorTest (705 ms total)

[----------] Global test environment tear-down
[==========] 1060 tests from 104 test cases ran. (561735 ms total)
[  PASSED  ] 1059 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] DockerFetcherPluginTest.INTERNET_CURL_InvokeFetchByName

 1 FAILED TEST
  YOU HAVE 231 DISABLED TESTS

194044  1584 containerizer.cpp:2969] Container 7346239a-02a5-4f0a-bc21-bcb693639e96 has exited
I1211 02:37:15.224057 14100 master.cpp:1117] Master terminating
I1211 02:37:15.225041 13176 hierarchical.cpp:643] Removed agent 6c9fcc20-eac8-4e6c-90e1-b79a795de9a7-S0
I1211 02:37:15.529048 13532 process.cpp:927] Stopped the socket accept loop
```

- Mesos Reviewbot Windows


On Dec. 10, 2018, 5:20 p.m., Joseph Wu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/69474/
> -----------------------------------------------------------
> 
> (Updated Dec. 10, 2018, 5:20 p.m.)
> 
> 
> Review request for mesos, Benno Evers, Gastón Kleiman, and Greg Mann.
> 
> 
> Bugs: MESOS-7564
>     https://issues.apache.org/jira/browse/MESOS-7564
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This adds two separate tests which check if the Agent sends heartbeats
> to HTTP executors, and if the HTTP executor driver sends heartbeats
> to the agent.
> 
> 
> Diffs
> -----
> 
>   src/examples/long_lived_executor.cpp b87a8069892b3886329581e86ed15072dd785b3d 
>   src/examples/test_http_executor.cpp e5f7cbb3b4e35663717f2a74550f8378bfafb0f9 
>   src/tests/executor_http_api_tests.cpp a635e1a3c228b52f47ba81a67753ea49ce092143 
>   src/tests/mesos.hpp b57bbd40051fed0829453c56b90f5660354f4334 
> 
> 
> Diff: https://reviews.apache.org/r/69474/diff/6/
> 
> 
> Testing
> -------
> 
> ```
> cmake --build . --target check
> src/mesos-tests --gtest_filter="*Heartbeat*" --verbose --gtest_repeat=-1 --gtest_break_on_failure
> ```
> 
> 
> Thanks,
> 
> Joseph Wu
> 
>


Re: Review Request 69474: Added tests for agent/executor heartbeating.

Posted by Joseph Wu <jo...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/69474/
-----------------------------------------------------------

(Updated Dec. 10, 2018, 5:20 p.m.)


Review request for mesos, Benno Evers, Gastón Kleiman, and Greg Mann.


Changes
-------

Used an `extern` constant defined in `executor/executor.cpp` instead of hardcoding `Minutes(30)`.


Bugs: MESOS-7564
    https://issues.apache.org/jira/browse/MESOS-7564


Repository: mesos


Description
-------

This adds two separate tests which check if the Agent sends heartbeats
to HTTP executors, and if the HTTP executor driver sends heartbeats
to the agent.


Diffs (updated)
-----

  src/examples/long_lived_executor.cpp b87a8069892b3886329581e86ed15072dd785b3d 
  src/examples/test_http_executor.cpp e5f7cbb3b4e35663717f2a74550f8378bfafb0f9 
  src/tests/executor_http_api_tests.cpp a635e1a3c228b52f47ba81a67753ea49ce092143 
  src/tests/mesos.hpp b57bbd40051fed0829453c56b90f5660354f4334 


Diff: https://reviews.apache.org/r/69474/diff/6/

Changes: https://reviews.apache.org/r/69474/diff/5-6/


Testing
-------

```
cmake --build . --target check
src/mesos-tests --gtest_filter="*Heartbeat*" --verbose --gtest_repeat=-1 --gtest_break_on_failure
```


Thanks,

Joseph Wu


Re: Review Request 69474: Added tests for agent/executor heartbeating.

Posted by Joseph Wu <jo...@mesosphere.io>.

> On Dec. 10, 2018, 8:33 a.m., Benno Evers wrote:
> > src/tests/executor_http_api_tests.cpp
> > Lines 1232 (patched)
> > <https://reviews.apache.org/r/69474/diff/5/?file=2112655#file2112655line1232>
> >
> >     Let's please fix this `TODO` before committing.

I left this TODO because none of the executors have headers, outside of the public header defining the executor driver interfaces.  There is a good deal of cleanup we could do by defining headers for the executor driver, v0_v1 shim, command executor, and default executor.  There are constants to pull out, environment variable checks we could translate into `Flags`, classes which could be put in headers, etc.

But it wouldn't necessarily make sense to make these cleanups in this chain (or one at a time).


- Joseph


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/69474/#review211143
-----------------------------------------------------------


On Dec. 7, 2018, 2:18 p.m., Joseph Wu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/69474/
> -----------------------------------------------------------
> 
> (Updated Dec. 7, 2018, 2:18 p.m.)
> 
> 
> Review request for mesos, Benno Evers, Gastón Kleiman, and Greg Mann.
> 
> 
> Bugs: MESOS-7564
>     https://issues.apache.org/jira/browse/MESOS-7564
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This adds two separate tests which check if the Agent sends heartbeats
> to HTTP executors, and if the HTTP executor driver sends heartbeats
> to the agent.
> 
> 
> Diffs
> -----
> 
>   src/examples/long_lived_executor.cpp b87a8069892b3886329581e86ed15072dd785b3d 
>   src/examples/test_http_executor.cpp e5f7cbb3b4e35663717f2a74550f8378bfafb0f9 
>   src/tests/executor_http_api_tests.cpp a635e1a3c228b52f47ba81a67753ea49ce092143 
>   src/tests/mesos.hpp b57bbd40051fed0829453c56b90f5660354f4334 
> 
> 
> Diff: https://reviews.apache.org/r/69474/diff/5/
> 
> 
> Testing
> -------
> 
> ```
> cmake --build . --target check
> src/mesos-tests --gtest_filter="*Heartbeat*" --verbose --gtest_repeat=-1 --gtest_break_on_failure
> ```
> 
> 
> Thanks,
> 
> Joseph Wu
> 
>


Re: Review Request 69474: Added tests for agent/executor heartbeating.

Posted by Benno Evers <be...@mesosphere.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/69474/#review211143
-----------------------------------------------------------


Fix it, then Ship it!





src/tests/executor_http_api_tests.cpp
Lines 1001 (patched)
<https://reviews.apache.org/r/69474/#comment296070>

    That's a pretty cool technique!



src/tests/executor_http_api_tests.cpp
Lines 1232 (patched)
<https://reviews.apache.org/r/69474/#comment296071>

    Let's please fix this `TODO` before committing.


- Benno Evers


On Dec. 7, 2018, 10:18 p.m., Joseph Wu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/69474/
> -----------------------------------------------------------
> 
> (Updated Dec. 7, 2018, 10:18 p.m.)
> 
> 
> Review request for mesos, Benno Evers, Gastón Kleiman, and Greg Mann.
> 
> 
> Bugs: MESOS-7564
>     https://issues.apache.org/jira/browse/MESOS-7564
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This adds two separate tests which check if the Agent sends heartbeats
> to HTTP executors, and if the HTTP executor driver sends heartbeats
> to the agent.
> 
> 
> Diffs
> -----
> 
>   src/examples/long_lived_executor.cpp b87a8069892b3886329581e86ed15072dd785b3d 
>   src/examples/test_http_executor.cpp e5f7cbb3b4e35663717f2a74550f8378bfafb0f9 
>   src/tests/executor_http_api_tests.cpp a635e1a3c228b52f47ba81a67753ea49ce092143 
>   src/tests/mesos.hpp b57bbd40051fed0829453c56b90f5660354f4334 
> 
> 
> Diff: https://reviews.apache.org/r/69474/diff/5/
> 
> 
> Testing
> -------
> 
> ```
> cmake --build . --target check
> src/mesos-tests --gtest_filter="*Heartbeat*" --verbose --gtest_repeat=-1 --gtest_break_on_failure
> ```
> 
> 
> Thanks,
> 
> Joseph Wu
> 
>


Re: Review Request 69474: Added tests for agent/executor heartbeating.

Posted by Mesos Reviewbot Windows <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/69474/#review211122
-----------------------------------------------------------



PASS: Mesos patch 69474 was successfully built and tested.

Reviews applied: `['69463', '69472', '69473', '69474']`

All the build artifacts available at: http://dcos-win.westus2.cloudapp.azure.com/artifacts/mesos-reviewbot-testing/2683/mesos-review-69474

- Mesos Reviewbot Windows


On Dec. 7, 2018, 2:18 p.m., Joseph Wu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/69474/
> -----------------------------------------------------------
> 
> (Updated Dec. 7, 2018, 2:18 p.m.)
> 
> 
> Review request for mesos, Benno Evers, Gastón Kleiman, and Greg Mann.
> 
> 
> Bugs: MESOS-7564
>     https://issues.apache.org/jira/browse/MESOS-7564
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This adds two separate tests which check if the Agent sends heartbeats
> to HTTP executors, and if the HTTP executor driver sends heartbeats
> to the agent.
> 
> 
> Diffs
> -----
> 
>   src/examples/long_lived_executor.cpp b87a8069892b3886329581e86ed15072dd785b3d 
>   src/examples/test_http_executor.cpp e5f7cbb3b4e35663717f2a74550f8378bfafb0f9 
>   src/tests/executor_http_api_tests.cpp a635e1a3c228b52f47ba81a67753ea49ce092143 
>   src/tests/mesos.hpp b57bbd40051fed0829453c56b90f5660354f4334 
> 
> 
> Diff: https://reviews.apache.org/r/69474/diff/5/
> 
> 
> Testing
> -------
> 
> ```
> cmake --build . --target check
> src/mesos-tests --gtest_filter="*Heartbeat*" --verbose --gtest_repeat=-1 --gtest_break_on_failure
> ```
> 
> 
> Thanks,
> 
> Joseph Wu
> 
>


Re: Review Request 69474: Added tests for agent/executor heartbeating.

Posted by Joseph Wu <jo...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/69474/
-----------------------------------------------------------

(Updated Dec. 7, 2018, 2:18 p.m.)


Review request for mesos, Benno Evers, Gastón Kleiman, and Greg Mann.


Changes
-------

More -Werror warnings about missing switch cases.


Bugs: MESOS-7564
    https://issues.apache.org/jira/browse/MESOS-7564


Repository: mesos


Description
-------

This adds two separate tests which check if the Agent sends heartbeats
to HTTP executors, and if the HTTP executor driver sends heartbeats
to the agent.


Diffs (updated)
-----

  src/examples/long_lived_executor.cpp b87a8069892b3886329581e86ed15072dd785b3d 
  src/examples/test_http_executor.cpp e5f7cbb3b4e35663717f2a74550f8378bfafb0f9 
  src/tests/executor_http_api_tests.cpp a635e1a3c228b52f47ba81a67753ea49ce092143 
  src/tests/mesos.hpp b57bbd40051fed0829453c56b90f5660354f4334 


Diff: https://reviews.apache.org/r/69474/diff/5/

Changes: https://reviews.apache.org/r/69474/diff/4-5/


Testing
-------

```
cmake --build . --target check
src/mesos-tests --gtest_filter="*Heartbeat*" --verbose --gtest_repeat=-1 --gtest_break_on_failure
```


Thanks,

Joseph Wu


Re: Review Request 69474: Added tests for agent/executor heartbeating.

Posted by Joseph Wu <jo...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/69474/
-----------------------------------------------------------

(Updated Dec. 5, 2018, 5:26 p.m.)


Review request for mesos, Benno Evers, Gastón Kleiman, and Greg Mann.


Changes
-------

Address comments, deal with MSVC compilation error, and fix warning in the MockHttpExecutor switch statement.


Bugs: MESOS-7564
    https://issues.apache.org/jira/browse/MESOS-7564


Repository: mesos


Description
-------

This adds two separate tests which check if the Agent sends heartbeats
to HTTP executors, and if the HTTP executor driver sends heartbeats
to the agent.


Diffs (updated)
-----

  src/tests/executor_http_api_tests.cpp a635e1a3c228b52f47ba81a67753ea49ce092143 
  src/tests/mesos.hpp c08e7e6c1dbc3dd9eb980868e43368c0a423c3ee 


Diff: https://reviews.apache.org/r/69474/diff/4/

Changes: https://reviews.apache.org/r/69474/diff/3-4/


Testing
-------

```
cmake --build . --target check
src/mesos-tests --gtest_filter="*Heartbeat*" --verbose --gtest_repeat=-1 --gtest_break_on_failure
```


Thanks,

Joseph Wu


Re: Review Request 69474: Added tests for agent/executor heartbeating.

Posted by Mesos Reviewbot Windows <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/69474/#review210961
-----------------------------------------------------------



FAIL: Some of the unit tests failed. Please check the relevant logs.

Reviews applied: `['69463', '69472', '69473', '69474']`

Failed command: `Start-MesosCITesting`

All the build artifacts available at: http://dcos-win.westus2.cloudapp.azure.com/artifacts/mesos-reviewbot-testing/2658/mesos-review-69474

Relevant logs:

- [mesos-tests-cmake.log](http://dcos-win.westus2.cloudapp.azure.com/artifacts/mesos-reviewbot-testing/2658/mesos-review-69474/logs/mesos-tests-cmake.log):

```
         d:\dcos\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8\src\c\src\zookeeper.c(3426): warning C4996: 'strerror': This function or variable may be unsafe. Consider using strerror_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8-build\zookeeper.vcxproj] [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8.vcxproj]
         d:\dcos\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8\src\c\src\zookeeper.c(3500): warning C4996: 'inet_ntoa': Use inet_ntop() or InetNtop() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8-build\zookeeper.vcxproj] [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8.vcxproj]
         d:\dcos\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8\src\c\src\zookeeper.c(3501): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8-build\zookeeper.vcxproj] [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8.vcxproj]
         d:\dcos\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8\src\c\src\zookeeper.c(3479): warning C4101: 'addrstr': unreferenced local variable [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8-build\zookeeper.vcxproj] [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8.vcxproj]
         d:\dcos\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8\src\c\src\recordio.c(170): warning C4267: '=': conversion from 'size_t' to 'int32_t', possible loss of data [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8-build\zookeeper.vcxproj] [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8.vcxproj]
         d:\dcos\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8\src\c\src\mt_adaptor.c(496): warning C4244: '=': conversion from 'time_t' to 'int32_t', possible loss of data [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8-build\zookeeper.vcxproj] [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8.vcxproj]
         d:\dcos\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8\src\c\src\winport.c(256): warning C4090: 'function': different 'const' qualifiers [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8-build\zookeeper.vcxproj] [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8.vcxproj]
         d:\dcos\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8\src\c\src\winport.c(166): warning C4716: 'pthread_cond_broadcast': must return a value [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8-build\zookeeper.vcxproj] [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8.vcxproj]
         d:\dcos\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8\src\c\src\winport.c(205): warning C4716: 'pthread_cond_wait': must return a value [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8-build\zookeeper.vcxproj] [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8.vcxproj]
         d:\dcos\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8\src\c\src\cli.c(124): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8-build\cli.vcxproj] [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8.vcxproj]
         d:\dcos\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8\src\c\src\cli.c(128): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8-build\cli.vcxproj] [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8.vcxproj]
         d:\dcos\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8\src\c\src\cli.c(279): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8-build\cli.vcxproj] [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8.vcxproj]
         d:\dcos\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8\src\c\src\cli.c(301): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8-build\cli.vcxproj] [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8.vcxproj]
         d:\dcos\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8\src\c\src\cli.c(368): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8-build\cli.vcxproj] [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8.vcxproj]
         d:\dcos\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8\src\c\src\cli.c(372): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8-build\cli.vcxproj] [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8.vcxproj]
         d:\dcos\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8\src\c\src\cli.c(512): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8-build\cli.vcxproj] [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8.vcxproj]
         d:\dcos\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8\src\c\src\cli.c(543): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8-build\cli.vcxproj] [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8.vcxproj]
         d:\dcos\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8\src\c\src\cli.c(548): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8-build\cli.vcxproj] [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8.vcxproj]
         d:\dcos\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8\src\c\src\cli.c(569): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8-build\cli.vcxproj] [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8.vcxproj]


       "D:\DCOS\mesos\src\tests\mesos-tests.vcxproj" (default target) (1) ->
       (ClCompile target) -> 
         d:\dcos\mesos\mesos\src\tests\executor_http_api_tests.cpp(1176): error C3480: 'mesos::internal::tests::executor': a lambda capture variable must be from an enclosing function scope [D:\DCOS\mesos\src\tests\mesos-tests.vcxproj]

    172 Warning(s)
    1 Error(s)

Time Elapsed 00:29:46.55
```

- Mesos Reviewbot Windows


On Nov. 29, 2018, 4:03 p.m., Joseph Wu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/69474/
> -----------------------------------------------------------
> 
> (Updated Nov. 29, 2018, 4:03 p.m.)
> 
> 
> Review request for mesos, Benno Evers, Gastón Kleiman, and Greg Mann.
> 
> 
> Bugs: MESOS-7564
>     https://issues.apache.org/jira/browse/MESOS-7564
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This adds two separate tests which check if the Agent sends heartbeats
> to HTTP executors, and if the HTTP executor driver sends heartbeats
> to the agent.
> 
> 
> Diffs
> -----
> 
>   src/tests/executor_http_api_tests.cpp a635e1a3c228b52f47ba81a67753ea49ce092143 
> 
> 
> Diff: https://reviews.apache.org/r/69474/diff/2/
> 
> 
> Testing
> -------
> 
> ```
> cmake --build . --target check
> src/mesos-tests --gtest_filter="*Heartbeat*" --verbose --gtest_repeat=-1 --gtest_break_on_failure
> ```
> 
> 
> Thanks,
> 
> Joseph Wu
> 
>


Re: Review Request 69474: Added tests for agent/executor heartbeating.

Posted by Joseph Wu <jo...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/69474/
-----------------------------------------------------------

(Updated Nov. 29, 2018, 4:03 p.m.)


Review request for mesos, Benno Evers, Gastón Kleiman, and Greg Mann.


Changes
-------

Fixed the flakiness in the `HeartbeatCalls` test by adding a little more synchronization between the executor driver and test thread.


Summary (updated)
-----------------

Added tests for agent/executor heartbeating.


Bugs: MESOS-7564
    https://issues.apache.org/jira/browse/MESOS-7564


Repository: mesos


Description
-------

This adds two separate tests which check if the Agent sends heartbeats
to HTTP executors, and if the HTTP executor driver sends heartbeats
to the agent.


Diffs (updated)
-----

  src/tests/executor_http_api_tests.cpp a635e1a3c228b52f47ba81a67753ea49ce092143 


Diff: https://reviews.apache.org/r/69474/diff/2/

Changes: https://reviews.apache.org/r/69474/diff/1-2/


Testing (updated)
-------

```
cmake --build . --target check
src/mesos-tests --gtest_filter="*Heartbeat*" --verbose --gtest_repeat=-1 --gtest_break_on_failure
```


Thanks,

Joseph Wu