mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Bannier <>
Subject Re: Review Request 70728: Backed `MockResourceProvider` by a process.
Date Sat, 27 Jul 2019 19:04:01 GMT

This is an automatically generated e-mail. To reply, visit:

(Updated July 27, 2019, 9:04 p.m.)

Review request for mesos, Chun-Hung Hsiao and Jan Schlicht.


Do not access the process' `info` directly

Bugs: MESOS-9560

Repository: mesos


We were passing callbacks into `MockResourceProvider` to the HTTP
driver. Since the lifecycle of the callbacks and the mock provider were
decoupled and these callbacks were binding the mock provider instance
the code was not safe as written as the driver could invoke the callback
after the provider had been destructed.

This patch makes sure that the callbacks are defered to a process. We
also dispatch a number of other functions which are strongly coupled to
the lifecycle of the provider. We still do not hide the provider away
completely so the provider can be mocked in tests.

Diffs (updated)

  src/tests/api_tests.cpp 641eb15153ddb85df322aa6a133ca8e4c6d6a510 
  src/tests/master_slave_reconciliation_tests.cpp 7b6ac50adacc8416b91c0dde55ff7ba46a20515c

  src/tests/master_tests.cpp b9ef13c31a9c3ae16e55d3ae8f9b1538a49cf49a 
  src/tests/mesos.hpp 4612e2e3d2bd32590248df58b546de8756636964 
  src/tests/operation_reconciliation_tests.cpp eae318da2273faae904f0155e49bb23cdb24f007 
  src/tests/resource_provider_manager_tests.cpp 7d48f18e89f046df6c92e52edeef592acfb13b10 
  src/tests/slave_tests.cpp abee107720d6b78bb017d2762431ae36c0679026 




`make check`


Benjamin Bannier

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