Re: Review Request 66227: Added test for `GROW_VOLUME` and `SHRINK_VOLUME` operator API.

2018-05-02 Thread Zhitao Li

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

(Updated May 2, 2018, 5:06 p.m.)


Review request for mesos, Chun-Hung Hsiao, Gaston Kleiman, and Greg Mann.


Changes
---

Run test on Windows too.


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


Repository: mesos


Description
---

Added test for `GROW_VOLUME` and `SHRINK_VOLUME` operator API.


Diffs (updated)
-

  src/tests/api_tests.cpp dd8e221d8fd1b2a241505345337897e4ee4a6347 


Diff: https://reviews.apache.org/r/66227/diff/9/

Changes: https://reviews.apache.org/r/66227/diff/8-9/


Testing
---


Thanks,

Zhitao Li



Re: Review Request 66227: Added test for `GROW_VOLUME` and `SHRINK_VOLUME` operator API.

2018-05-02 Thread Chun-Hung Hsiao

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




src/tests/api_tests.cpp
Lines 3685-3687 (patched)


This test actually works on Windows :)
```
PS C:\Users\chhsiao\src\mesos\build-grpc> src/mesos-tests.exe 
--gtest_filter="*Grow*:*Shrink*"
...
[==] Running 4 tests from 1 test case.
[--] Global test environment set-up.
[--] 4 tests from ContentType/MasterAPITest
[ RUN  ] ContentType/MasterAPITest.GrowVolume/0
[   OK ] ContentType/MasterAPITest.GrowVolume/0 (264 ms)
[ RUN  ] ContentType/MasterAPITest.GrowVolume/1
[   OK ] ContentType/MasterAPITest.GrowVolume/1 (267 ms)
[ RUN  ] ContentType/MasterAPITest.ShrinkVolume/0
[   OK ] ContentType/MasterAPITest.ShrinkVolume/0 (193 ms)
[ RUN  ] ContentType/MasterAPITest.ShrinkVolume/1
[   OK ] ContentType/MasterAPITest.ShrinkVolume/1 (232 ms)
[--] 4 tests from ContentType/MasterAPITest (999 ms total)

[--] Global test environment tear-down
[==] 4 tests from 1 test case ran. (1406 ms total)
[  PASSED  ] 4 tests.
```



src/tests/api_tests.cpp
Lines 3798-3800 (patched)


Ditto.


- Chun-Hung Hsiao


On May 2, 2018, 5:28 p.m., Zhitao Li wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66227/
> ---
> 
> (Updated May 2, 2018, 5:28 p.m.)
> 
> 
> Review request for mesos, Chun-Hung Hsiao, Gaston Kleiman, and Greg Mann.
> 
> 
> Bugs: MESOS-8747
> https://issues.apache.org/jira/browse/MESOS-8747
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Added test for `GROW_VOLUME` and `SHRINK_VOLUME` operator API.
> 
> 
> Diffs
> -
> 
>   src/tests/api_tests.cpp dd8e221d8fd1b2a241505345337897e4ee4a6347 
> 
> 
> Diff: https://reviews.apache.org/r/66227/diff/8/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Zhitao Li
> 
>



Re: Review Request 66227: Added test for `GROW_VOLUME` and `SHRINK_VOLUME` operator API.

2018-05-02 Thread Mesos Reviewbot Windows

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



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

Reviews applied: `['66218', '66049', '66733', '66050', '66219', '66858', 
'66220', '66531', '66532', '66052', '66051', '66227']`

Failed command: `Start-MesosCITesting`

All the build artifacts available at: 
http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/66227

Relevant logs:

- 
[mesos-tests-stdout.log](http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/66227/logs/mesos-tests-stdout.log):

```
[--] 9 tests from Endpoint/SlaveEndpointTest (1052 ms total)

[--] 2 tests from ContainerizerType/DefaultContainerDNSFlagTest
[ RUN  ] ContainerizerType/DefaultContainerDNSFlagTest.ValidateFlag/0
[   OK ] ContainerizerType/DefaultContainerDNSFlagTest.ValidateFlag/0 (32 
ms)
[ RUN  ] ContainerizerType/DefaultContainerDNSFlagTest.ValidateFlag/1
[   OK ] ContainerizerType/DefaultContainerDNSFlagTest.ValidateFlag/1 (40 
ms)
[--] 2 tests from ContainerizerType/DefaultContainerDNSFlagTest (74 ms 
total)

[--] 1 test from IsolationFlag/CpuIsolatorTest
[ RUN  ] IsolationFlag/CpuIsolatorTest.ROOT_UserCpuUsage/0
[   OK ] IsolationFlag/CpuIsolatorTest.ROOT_UserCpuUsage/0 (735 ms)
[--] 1 test from IsolationFlag/CpuIsolatorTest (761 ms total)

[--] 1 test from IsolationFlag/MemoryIsolatorTest
[ RUN  ] IsolationFlag/MemoryIsolatorTest.ROOT_MemUsage/0
[   OK ] IsolationFlag/MemoryIsolatorTest.ROOT_MemUsage/0 (820 ms)
[--] 1 test from IsolationFlag/MemoryIsolatorTest (846 ms total)

[--] Global test environment tear-down
[==] 971 tests from 95 test cases ran. (468797 ms total)
[  PASSED  ] 969 tests.
[  FAILED  ] 2 tests, listed below:
[  FAILED  ] 
ContentType/ResourceProviderManagerHttpApiTest.ResubscribeResourceProvider/0, 
where GetParam() = application/x-protobuf
[  FAILED  ] 
ContentType/ResourceProviderManagerHttpApiTest.ResubscribeResourceProvider/1, 
where GetParam() = application/json

 2 FAILED TESTS
  YOU HAVE 220 DISABLED TESTS

```

- 
[mesos-tests-stderr.log](http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/66227/logs/mesos-tests-stderr.log):

```
I0502 19:06:20.751076  2308 master.cpp:10787] Updating the state of task 
d5d07158-bfff-4120-bfd6-e245aabfdbf4 of framework 
25977124-b368-4fff-ae64-c44cc50adab6- (latest state: TASK_KILLED, status 
update state: TASK_KILLED)
I0502 19:I0502 19:06:20.580087  3216 exec.cpp:162] Version: 1.6.0
I0502 19:06:20.607092 11372 exec.cpp:236] Executor registered on agent 
25977124-b368-4fff-ae64-c44cc50adab6-S0
I0502 19:06:20.611101  9536 executor.cpp:177] Received SUBSCRIBED event
I0502 19:06:20.616091  9536 executor.cpp:181] Subscribed executor on 
winbldsrv-01.zq4gs31qjdiunm1ryi1452nvnh.dx.internal.cloudapp.net
I0502 19:06:20.616091  9536 executor.cpp:177] Received LAUNCH event
I0502 19:06:20.622112  9536 executor.cpp:649] Starting task 
d5d07158-bfff-4120-bfd6-e245aabfdbf4
I0502 19:06:20.712095  9536 executor.cpp:484] Running 
'D:\DCOS\mesos\src\mesos-containerizer.exe launch '
I0502 19:06:20.725108  9536 executor.cpp:662] Forked command at 9540
I0502 19:06:20.754078  5468 exec.cpp:445] Executor asked to shutdown
I0502 19:06:20.755075  7228 executor.cpp:177] Received SHUTDOWN event
I0502 19:06:20.755075  7228 executor.cpp:759] Shutting down
I0502 19:06:20.755075  7228 executor.cpp:869] Sending SIGTERM to process tree 
at pid 906:20.752136  7176 slave.cpp:3935] Shutting down framework 
25977124-b368-4fff-ae64-c44cc50adab6-
I0502 19:06:20.752136  7176 slave.cpp:6656] Shutting down executor 
'd5d07158-bfff-4120-bfd6-e245aabfdbf4' of framework 
25977124-b368-4fff-ae64-c44cc50adab6- at executor(1)@10.3.1.8:62605
I0502 19:06:20.754078  2308 master.cpp:10886] Removing task 
d5d07158-bfff-4120-bfd6-e245aabfdbf4 with resources cpus(allocated: *):4; 
mem(allocated: *):2048; disk(allocated: *):1024; ports(allocated: 
*):[31000-32000] of framework 25977124-b368-4fff-ae64-c44cc50adab6- on 
agent 25977124-b368-4fff-ae64-c44cc50adab6-S0 at slave(438)@10.3.1.8:62584 
(winbldsrv-01.zq4gs31qjdiunm1ryi1452nvnh.dx.internal.cloudapp.net)
I0502 19:06:20.754078  7176 slave.cpp:929] Agent terminating
W0502 19:06:20.754078  7176 slave.cpp:3931] Ignoring shutdown framework 
25977124-b368-4fff-ae64-c44cc50adab6- because it is terminating
I0502 19:06:20.757067 10356 master.cpp:1296] Agent 
25977124-b368-4fff-ae64-c44cc50adab6-S0 at slave(438)@10.3.1.8:62584 
(winbldsrv-01.zq4gs31qjdiunm1ryi1452nvnh.dx.internal.cloudapp.net) disconnected
I0502 19:06:20.757067 10356 master.cpp:3296] Disconnecting agent 
25977124-b368-4fff-ae64-c44cc50adab6-S0 at slave(438)@10.3.1.8:62584 
(winbldsrv-01.zq4gs31qjdiunm1ryi1452nvnh.dx.internal.cloudapp.net)
I0502 

Re: Review Request 66227: Added test for `GROW_VOLUME` and `SHRINK_VOLUME` operator API.

2018-05-02 Thread Mesos Reviewbot Windows

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



FAIL: Failed to apply the dependent review: 66531.

Failed command: `python.exe .\support\apply-reviews.py -n -r 66531`

All the build artifacts available at: 
http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/66227

Relevant logs:

- 
[apply-review-66531-stdout.log](http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/66227/logs/apply-review-66531-stdout.log):

```
error: patch failed: src/master/master.cpp:4907
error: src/master/master.cpp: patch does not apply
```

- Mesos Reviewbot Windows


On May 2, 2018, 5:28 p.m., Zhitao Li wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66227/
> ---
> 
> (Updated May 2, 2018, 5:28 p.m.)
> 
> 
> Review request for mesos, Chun-Hung Hsiao, Gaston Kleiman, and Greg Mann.
> 
> 
> Bugs: MESOS-8747
> https://issues.apache.org/jira/browse/MESOS-8747
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Added test for `GROW_VOLUME` and `SHRINK_VOLUME` operator API.
> 
> 
> Diffs
> -
> 
>   src/tests/api_tests.cpp dd8e221d8fd1b2a241505345337897e4ee4a6347 
> 
> 
> Diff: https://reviews.apache.org/r/66227/diff/7/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Zhitao Li
> 
>



Re: Review Request 66227: Added test for `GROW_VOLUME` and `SHRINK_VOLUME` operator API.

2018-05-02 Thread Zhitao Li

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

(Updated May 2, 2018, 10:28 a.m.)


Review request for mesos, Chun-Hung Hsiao, Gaston Kleiman, and Greg Mann.


Changes
---

Review comments.


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


Repository: mesos


Description
---

Added test for `GROW_VOLUME` and `SHRINK_VOLUME` operator API.


Diffs (updated)
-

  src/tests/api_tests.cpp dd8e221d8fd1b2a241505345337897e4ee4a6347 


Diff: https://reviews.apache.org/r/66227/diff/7/

Changes: https://reviews.apache.org/r/66227/diff/6-7/


Testing
---


Thanks,

Zhitao Li



Re: Review Request 66227: Added test for `GROW_VOLUME` and `SHRINK_VOLUME` operator API.

2018-05-01 Thread Chun-Hung Hsiao

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


Fix it, then Ship it!





src/tests/api_tests.cpp
Lines 3684 (patched)


Suggestion: Test growing a persistent volume through the master operator 
API.



src/tests/api_tests.cpp
Lines 3685 (patched)


Suggestion: This test is disabled ...

Also, is it true that persistent volumes are not supported on Windows yet? 
If so, why is the `CreateAndDestroyVolumes` test not disabled on Windows?



src/tests/api_tests.cpp
Lines 3688 (patched)


Since we don't specify any special flag for this test, this is not 
required. The default `StartMaster()` implementation will call the overridden 
`MasterAPITest::CreateMasterFlags()` to use the long allocation interval.



src/tests/api_tests.cpp
Lines 3700 (patched)


s/`Static`/`static`/



src/tests/api_tests.cpp
Lines 3745 (patched)


Missing a period at the end of the comment. See: 
http://mesos.apache.org/documentation/latest/c++-style-guide/#comments



src/tests/api_tests.cpp
Lines 3787-3793 (patched)


Alternatively, we could do:
```
RepeatedPtrField agentResources = devolve(
v1GetAgentsResponse->get_agents().agents(0).total_resources());
upgradeResources();
```



src/tests/api_tests.cpp
Lines 3801 (patched)


Suggestion: Test shrinking a persistent volume through the master operator 
API.



src/tests/api_tests.cpp
Lines 3802 (patched)


Suggestion: This test is disabled ...

Also, is it true that persistent volumes are not supported on Windows yet? 
If so, why is the `CreateAndDestroyVolumes` test not disabled on Windows?



src/tests/api_tests.cpp
Lines 3805 (patched)


This is not required.



src/tests/api_tests.cpp
Lines 3817 (patched)


s/`Static`/`static`/



src/tests/api_tests.cpp
Lines 3902-3908 (patched)


Alternatively, we could do:
```
RepeatedPtrField agentResources = devolve(
v1GetAgentsResponse->get_agents().agents(0).total_resources());
upgradeResources();
```


- Chun-Hung Hsiao


On April 23, 2018, 8:24 p.m., Zhitao Li wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66227/
> ---
> 
> (Updated April 23, 2018, 8:24 p.m.)
> 
> 
> Review request for mesos, Chun-Hung Hsiao, Gaston Kleiman, and Greg Mann.
> 
> 
> Bugs: MESOS-8747
> https://issues.apache.org/jira/browse/MESOS-8747
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Added test for `GROW_VOLUME` and `SHRINK_VOLUME` operator API.
> 
> 
> Diffs
> -
> 
>   src/tests/api_tests.cpp dd8e221d8fd1b2a241505345337897e4ee4a6347 
> 
> 
> Diff: https://reviews.apache.org/r/66227/diff/6/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Zhitao Li
> 
>



Re: Review Request 66227: Added test for `GROW_VOLUME` and `SHRINK_VOLUME` operator API.

2018-04-23 Thread Zhitao Li

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

(Updated April 23, 2018, 1:24 p.m.)


Review request for mesos, Chun-Hung Hsiao, Gaston Kleiman, and Greg Mann.


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


Repository: mesos


Description
---

Added test for `GROW_VOLUME` and `SHRINK_VOLUME` operator API.


Diffs (updated)
-

  src/tests/api_tests.cpp dd8e221d8fd1b2a241505345337897e4ee4a6347 


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

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


Testing
---


Thanks,

Zhitao Li



Re: Review Request 66227: Added test for `GROW_VOLUME` and `SHRINK_VOLUME` operator API.

2018-04-23 Thread Zhitao Li

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

(Updated April 23, 2018, 1:10 p.m.)


Review request for mesos, Chun-Hung Hsiao, Gaston Kleiman, and Greg Mann.


Changes
---

Split into two tests, only use API, and other review comments.


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


Repository: mesos


Description
---

Added test for `GROW_VOLUME` and `SHRINK_VOLUME` operator API.


Diffs (updated)
-

  src/tests/api_tests.cpp dd8e221d8fd1b2a241505345337897e4ee4a6347 


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

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


Testing
---


Thanks,

Zhitao Li



Re: Review Request 66227: Added test for `GROW_VOLUME` and `SHRINK_VOLUME` operator API.

2018-04-19 Thread Mesos Reviewbot Windows

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



FAIL: Failed to apply the dependent review: 66049.

Failed command: `python.exe .\support\apply-reviews.py -n -r 66049`

All the build artifacts available at: 
http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/66227

Relevant logs:

- 
[apply-review-66049-stdout.log](http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/66227/logs/apply-review-66049-stdout.log):

```
error: patch failed: include/mesos/mesos.proto:1917
error: include/mesos/mesos.proto: patch does not apply
error: patch failed: include/mesos/v1/mesos.proto:1909
error: include/mesos/v1/mesos.proto: patch does not apply
```

- Mesos Reviewbot Windows


On April 11, 2018, 2:21 p.m., Zhitao Li wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66227/
> ---
> 
> (Updated April 11, 2018, 2:21 p.m.)
> 
> 
> Review request for mesos, Chun-Hung Hsiao, Gaston Kleiman, and Greg Mann.
> 
> 
> Bugs: MESOS-8747
> https://issues.apache.org/jira/browse/MESOS-8747
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Added test for `GROW_VOLUME` and `SHRINK_VOLUME` operator API.
> 
> 
> Diffs
> -
> 
>   src/tests/api_tests.cpp dd8e221d8fd1b2a241505345337897e4ee4a6347 
> 
> 
> Diff: https://reviews.apache.org/r/66227/diff/4/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Zhitao Li
> 
>



Re: Review Request 66227: Added test for `GROW_VOLUME` and `SHRINK_VOLUME` operator API.

2018-04-19 Thread Zhitao Li


> On April 17, 2018, 6:25 p.m., Chun-Hung Hsiao wrote:
> > src/tests/api_tests.cpp
> > Lines 3688 (patched)
> > 
> >
> > Let's try to split the test into two so each test verifies one 
> > operation.
> > 
> > Also, what's the reason of disabling the test on Windows?
> > 
> > And do you think it is reasonable to have tests that leave `agent_id` 
> > unset, to expose the code path of validating the existence of `agent_id`?

Persistent volume creation is not working on Windows yet.

I'm okay to add some check about the validation of mising `agent_id`.


> On April 17, 2018, 6:25 p.m., Chun-Hung Hsiao wrote:
> > src/tests/api_tests.cpp
> > Lines 3766 (patched)
> > 
> >
> > Not sure if this is necessary. Could you justify the need of this 
> > synchronization?

I'll see whether this is necessary. In the other test, this is necessary if we 
rely on offers to reflect operation result: to work around possible race 
condition between calling `allocation->updateAllocation()` and clock::advance.


- Zhitao


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


On April 11, 2018, 2:21 p.m., Zhitao Li wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66227/
> ---
> 
> (Updated April 11, 2018, 2:21 p.m.)
> 
> 
> Review request for mesos, Chun-Hung Hsiao, Gaston Kleiman, and Greg Mann.
> 
> 
> Bugs: MESOS-8747
> https://issues.apache.org/jira/browse/MESOS-8747
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Added test for `GROW_VOLUME` and `SHRINK_VOLUME` operator API.
> 
> 
> Diffs
> -
> 
>   src/tests/api_tests.cpp dd8e221d8fd1b2a241505345337897e4ee4a6347 
> 
> 
> Diff: https://reviews.apache.org/r/66227/diff/4/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Zhitao Li
> 
>



Re: Review Request 66227: Added test for `GROW_VOLUME` and `SHRINK_VOLUME` operator API.

2018-04-17 Thread Chun-Hung Hsiao

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




src/tests/api_tests.cpp
Lines 3688 (patched)


Let's try to split the test into two so each test verifies one operation.

Also, what's the reason of disabling the test on Windows?

And do you think it is reasonable to have tests that leave `agent_id` 
unset, to expose the code path of validating the existence of `agent_id`?



src/tests/api_tests.cpp
Lines 3692-3695 (patched)


This is not needed. The overloaded `MasterAPITest::CreateMasterFlags()` 
already extends the allocation interval.



src/tests/api_tests.cpp
Lines 3700 (patched)


Since the API is not called XXXVolumes, let's just say
```
// ... use it in the API calls.
```
so need to break the line here.



src/tests/api_tests.cpp
Lines 3711-3719 (patched)


No need to add the `RESOURCE_PROVIDER` capability since this is set up by 
default in 1.6. In fact, we should remove it here so if the default 
capabilities are changed in the future, we will be able to capture the problem 
through this test.



src/tests/api_tests.cpp
Lines 3750 (patched)


Let's move this to the beginning of this test.



src/tests/api_tests.cpp
Lines 3766 (patched)


Not sure if this is necessary. Could you justify the need of this 
synchronization?



src/tests/api_tests.cpp
Lines 3768 (patched)


Is this necessary?



src/tests/api_tests.cpp
Lines 3787 (patched)


Do we need this? IIRC an event-based allocation will be triggered (and thus 
an offer will be sent) when a framework is added.



src/tests/api_tests.cpp
Lines 3791 (patched)


```
Offer offer = offersAfterCreate->at(0);
```



src/tests/api_tests.cpp
Lines 3801-3809 (patched)


Let's do the following for readability:
```
v1::master::Call::GrowVolume* growVolume =
  v1GrowVolumeCall.mutable_grow_volume();
growVolume->mutable_agent_id()->CopyFrom(evolve(slaveId));
growVolume->mutable_volume()->CopyFrom(evolve(volume));
growVolume->mutable_addition)->CopyFrom(evolve(addition));
```



src/tests/api_tests.cpp
Lines 3821 (patched)


No need for this since the clock is paused.



src/tests/api_tests.cpp
Lines 3834 (patched)


Again, I'm not convinced that this is required.



src/tests/api_tests.cpp
Lines 3836 (patched)


Do we need this?



src/tests/api_tests.cpp
Lines 3841 (patched)


```
offer = offersAfterGrow->at(0);
```



src/tests/api_tests.cpp
Lines 3859-3866 (patched)


```
v1::master::Call::ShrinkVolume* shrinkVolume =
  v1ShrinkVolumeCall.mutable_shrink_volume();
shrinkVolume->...
```



src/tests/api_tests.cpp
Lines 3878 (patched)


No need for this as the clock is paused.



src/tests/api_tests.cpp
Lines 3891 (patched)


Again, not sure if this is needed.



src/tests/api_tests.cpp
Lines 3893 (patched)


Also it seems to me that this is not needed.



src/tests/api_tests.cpp
Lines 3898 (patched)


```
offer = offerAfterShrink->at(0);
```



src/tests/api_tests.cpp
Lines 3903-3945 (patched)


If I'm not mistaken, the test teardown would clean up the work dir, and 
thus the persistent volume, so this is not required. Can you verify that?


- Chun-Hung Hsiao


On April 11, 2018, 9:21 p.m., Zhitao Li wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66227/
> ---
> 
> (Updated April 11, 2018, 9:21 p.m.)
> 
> 
> Review request for mesos, Chun-Hung Hsiao, Gaston Kleiman, and Greg Mann.
> 
> 
> Bugs: MESOS-8747
> https://issues.apache.org/jira/browse/MESOS-8747
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Added test 

Re: Review Request 66227: Added test for `GROW_VOLUME` and `SHRINK_VOLUME` operator API.

2018-04-11 Thread Zhitao Li

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

(Updated April 11, 2018, 2:21 p.m.)


Review request for mesos, Chun-Hung Hsiao, Gaston Kleiman, and Greg Mann.


Changes
---

Fix macro so it will skip on windows.


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


Repository: mesos


Description
---

Added test for `GROW_VOLUME` and `SHRINK_VOLUME` operator API.


Diffs (updated)
-

  src/tests/api_tests.cpp dd8e221d8fd1b2a241505345337897e4ee4a6347 


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

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


Testing
---


Thanks,

Zhitao Li



Re: Review Request 66227: Added test for `GROW_VOLUME` and `SHRINK_VOLUME` operator API.

2018-04-09 Thread Mesos Reviewbot Windows

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



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

Reviews applied: `['66218', '66049', '66050', '66219', '66220', '66052', 
'66051', '66227']`

Failed command: `Start-MesosCITesting`

All the build artifacts available at: 
http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/66227

Relevant logs:

- 
[mesos-tests-stdout.log](http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/66227/logs/mesos-tests-stdout.log):

```
[--] 9 tests from Endpoint/SlaveEndpointTest (1103 ms total)

[--] 2 tests from ContainerizerType/DefaultContainerDNSFlagTest
[ RUN  ] ContainerizerType/DefaultContainerDNSFlagTest.ValidateFlag/0
[   OK ] ContainerizerType/DefaultContainerDNSFlagTest.ValidateFlag/0 (38 
ms)
[ RUN  ] ContainerizerType/DefaultContainerDNSFlagTest.ValidateFlag/1
[   OK ] ContainerizerType/DefaultContainerDNSFlagTest.ValidateFlag/1 (45 
ms)
[--] 2 tests from ContainerizerType/DefaultContainerDNSFlagTest (85 ms 
total)

[--] 1 test from IsolationFlag/CpuIsolatorTest
[ RUN  ] IsolationFlag/CpuIsolatorTest.ROOT_UserCpuUsage/0
[   OK ] IsolationFlag/CpuIsolatorTest.ROOT_UserCpuUsage/0 (783 ms)
[--] 1 test from IsolationFlag/CpuIsolatorTest (811 ms total)

[--] 1 test from IsolationFlag/MemoryIsolatorTest
[ RUN  ] IsolationFlag/MemoryIsolatorTest.ROOT_MemUsage/0
[   OK ] IsolationFlag/MemoryIsolatorTest.ROOT_MemUsage/0 (831 ms)
[--] 1 test from IsolationFlag/MemoryIsolatorTest (857 ms total)

[--] Global test environment tear-down
[==] 956 tests from 94 test cases ran. (473021 ms total)
[  PASSED  ] 954 tests.
[  FAILED  ] 2 tests, listed below:
[  FAILED  ] 
ContentType/MasterAPITest.CreateGrowShrinkDestroyPersistentVolume/0, where 
GetParam() = application/x-protobuf
[  FAILED  ] 
ContentType/MasterAPITest.CreateGrowShrinkDestroyPersistentVolume/1, where 
GetParam() = application/json

 2 FAILED TESTS
  YOU HAVE 214 DISABLED TESTS

```

- 
[mesos-tests-stderr.log](http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/66227/logs/mesos-tests-stderr.log):

```
I0410 05:22:38.315735  6856 master.cpp:8218] Status update TASK_RUNNING (Status 
UUID: 1acf0fde-f61c-4b96-b025-95dcd4fe2e9c) for task 
b3c4d6d6-54a9-4ee9-9233-81e853a6cbf6 of framework 
e39bd1ae-0e60-446e-9080-544f95e5cf95- from agent 
e39bd1ae-0e60-446e-9080-544f95e5cf95-S0 at slave(425)@10.3.1.8:59992 
(winbldsrv-01.zq4gs31qjdiunm1ryi1452nvnh.dx.internal.cloudapp.net)
I0410 05:22:38.316727  6856 master.cpp:8275] Forwarding status update 
TASK_RUNNING (Status UUID: 1acf0fde-f61c-4b96-b025-95dcd4fe2e9c) for task 
b3c4d6d6-54a9-4ee9-9233-81e853a6cbf6 of framework 
e39bd1ae-0e60-446e-9080-544f95e5cf95-
I0410 05:22:38.317734  6856 master.cpp:10590] Updating the state of task 
b3c4d6d6-54a9-4ee9-9233-81e853a6cbf6 of framework 
e39bd1ae-0e60-446e-9080-544f95e5cf95- (latest state: TASK_RUNNING, status 
update state: TASK_RUNNING)
I0410 05:22:38.319731 18116 master.cpp:6099] Processing ACKNOWLEDGE call for 
status 1acf0fde-f61c-4b96-b025-95dcd4fe2e9c for task 
b3c4d6d6-54a9-4ee9-9233-81e853a6cbf6 of framework 
e39bd1ae-0e60-446e-9080-544f95e5cf95- (default) at 
scheduler-5d889c47-24cc-4d2f-9519-8bf0695c98fb@10.3.1.8:59992 on agent 
e39bd1ae-0e60-446e-9080-544f95e5cf95-S0
I0410 05:22:38.320736 15636 task_status_update_manager.cpp:401] Received task 
status update acknowledgement (UUID: 1acf0fde-f61c-4b96-b025-95dcd4fe2e9c) for 
task b3c4d6d6-54a9-4ee9-9233-81e853a6cbf6 of framework 
e39bd1ae-0e60-446e-9080-544f95e5cf95-
I0410 05:22:38.335837 19904 sched.cpp:2007] Asked to stop the driver
I0410 05:22:38.335837 16752 sched.cpp:1189] Stopping framework 
e39bd1ae-0e60-446e-9080-544f95e5cf95-
I0410 05:22:38.336745 20752 master.cpp:9860] Processing TEARDOWN call for 
framework e39bd1ae-0e60-446e-9080-544f95e5cf95- (default) at 
scheduler-5d889c47-24cc-4d2f-9519-8bf0695c98fb@10.3.1.8:59992
I0410 05:22:38.336745 20752 master.cpp:9872] Removing framework 
e39bd1ae-0e60-446e-9080-544f95e5cf95- (default) at 
scheduler-5d889c47-24cc-4d2f-9519-8bf0695c98fb@10.3.1.8:59992
I0410 05:22:38.336745 20752 master.cpp:3249] Deactivating framework 
e39bd1ae-0e60-446e-9080-544f95e5cf95- (default) at 
scheduler-5d889c47-24cc-4d2f-9519-8bf0695c98fb@10.3.1.8:59992
I0410 05:22:38.337739 16252 hierarchical.cpp:405] Deactivated framework 
e39bd1ae-0e60-446e-9080-544f95e5cf95-
I0410 05:22:38.337739 18116 slave.cpp:3973] Shutting down framework 
e39bd1ae-0e60-446e-9080-544f95e5cf95-
I0410 05:22:38.337739 20752 master.cpp:10590] Updating the state of task 
b3c4d6d6-54a9-4ee9-9233-81e853a6cbf6 of framework 
e39bd1ae-0e60-446e-9080-544f95e5cf95- (latest state: TASK_KILLED, status 

Re: Review Request 66227: Added test for `GROW_VOLUME` and `SHRINK_VOLUME` operator API.

2018-04-09 Thread Zhitao Li

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

(Updated April 9, 2018, 9:22 p.m.)


Review request for mesos, Chun-Hung Hsiao, Gaston Kleiman, and Greg Mann.


Changes
---

Fix typoes and missing expect and make test fully pass.


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


Repository: mesos


Description
---

Added test for `GROW_VOLUME` and `SHRINK_VOLUME` operator API.


Diffs (updated)
-

  src/tests/api_tests.cpp dd8e221d8fd1b2a241505345337897e4ee4a6347 


Diff: https://reviews.apache.org/r/66227/diff/3/

Changes: https://reviews.apache.org/r/66227/diff/2-3/


Testing
---


Thanks,

Zhitao Li



Re: Review Request 66227: Added test for `GROW_VOLUME` and `SHRINK_VOLUME` operator API.

2018-03-29 Thread Mesos Reviewbot Windows

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



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

Reviews applied: `['66342', '66343', '66049', '66344', '66218', '66050', 
'66219', '66052', '66220', '66051', '66227']`

Failed command: `Start-MesosCITesting`

All the build artifacts available at: 
http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/66227

Relevant logs:

- 
[mesos-tests-stdout.log](http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/66227/logs/mesos-tests-stdout.log):

```
[   OK ] SlaveTest.RestartSlaveRequireExecutorAuthentication (4872 ms)
[ RUN  ] SlaveTest.KillTaskGroupBetweenRunTaskParts

GMOCK WARNING:
Uninteresting mock function call - returning directly.
Function call: failure(009B8E19B9C8, @021A854E8A10 48-byte object 
<60-E9 44-10 F7-7F 00-00 00-00 00-00 00-00 00-00 07-00 00-00 00-00 00-00 50-F6 
81-85 1A-02 00-00 70-FD 81-85 1A-02 00-00 FF-FF FF-FF CD-CD CD-CD>)
NOTE: You can safely ignore the above warning unless this call should not 
happen.  Do not suppress it by blindly adding an EXPECT_CALL() if you don't 
mean to enforce the call.  See 
https://github.com/google/googletest/blob/master/googlemock/docs/CookBook.md#knowing-when-to-expect
 for details.
[   OK ] SlaveTest.KillTaskGroupBetweenRunTaskParts (243 ms)
[ RUN  ] SlaveTest.KillQueuedTaskGroup
[   OK ] SlaveTest.KillQueuedTaskGroup (334 ms)
[ RUN  ] SlaveTest.MaxCompletedExecutorsPerFrameworkFlag
[   OK ] SlaveTest.MaxCompletedExecutorsPerFrameworkFlag (1186 ms)
[ RUN  ] SlaveTest.ShutdownV0ExecutorIfItReregistersWithoutReconnect
[   OK ] SlaveTest.ShutdownV0ExecutorIfItReregistersWithoutReconnect (327 
ms)
[ RUN  ] SlaveTest.IgnoreV0ExecutorIfItReregistersWithoutReconnect
[   OK ] SlaveTest.IgnoreV0ExecutorIfItReregistersWithoutReconnect (292 ms)
[ RUN  ] SlaveTest.BrowseExecutorSandboxByVirtualPath
[   OK ] SlaveTest.BrowseExecutorSandboxByVirtualPath (322 ms)
[ RUN  ] SlaveTest.DisconnectedExecutorDropsMessages
[   OK ] SlaveTest.DisconnectedExecutorDropsMessages (321 ms)
[ RUN  ] SlaveTest.ExecutorReregistrationTimeoutFlag
[   OK ] SlaveTest.ExecutorReregistrationTimeoutFlag (1036 ms)
[ RUN  ] SlaveTest.ResourceProviderSubscribe
[   OK ] SlaveTest.ResourceProviderSubscribe (240 ms)
[ RUN  ] SlaveTest.ResourceVersions
[   OK ] SlaveTest.ResourceVersions (203 ms)
[ RUN  ] SlaveTest.ReconfigurationPolicy
[   OK ] SlaveTest.ReconfigurationPolicy (294 ms)
[ RUN  ] SlaveTest.ResourceProviderReconciliation
```

- 
[mesos-tests-stderr.log](http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/66227/logs/mesos-tests-stderr.log):

```
@   7FF70AA18778  
std::_Invoker_functor::_Call<,process::Future,process::ProcessBase
 * __ptr64>
@   7FF70AA9E178  
std::invoke<,process::Future,process::ProcessBase
 * __ptr64>
@   7FF70AAAE99B  
lambda::internal::Partial<,process::Future,std::_Ph<1>
 
>::invoke_expand<,std::tuple
 >,process::ProcessBase * __ptr64>
@   7FF70AAA465C  
std::invoke
 >,process::ProcessBase * __ptr64>
@   7FF70A9FB791  
)
 >,process::ProcessBase * __ptr64
@   7FF70AB41FE6  process::ProcessBase * 
__ptr64)>::CallableFn
 > >::operator(
@   7FF70C44897D  process::ProcessBase * __ptr64)>::operator(
@   7FF70C31FED9  process::ProcessBase::consume
@   7FF70C49C14A  process::DispatchEvent::consume
@   7FF708721437  process::ProcessBase::serve
@   7FF70C32DEF0  process::ProcessManager::resume
@   7FF70C439031   ?? 
@   7FF70C376060  
std::_Invoker_functor::_Call< >
@   7FF70C3CC490  std::invoke< 
>
@   7FF70C384D0C  
std::_LaunchPad,std::default_delete > 
> >::_Execute<0>
@   7FF70C48440A  
std::_LaunchPad,std::default_delete > 
> >::_Run
@   7FF70C470E68  
std::_LaunchPad,std::default_delete > 
> >::_Go
@   7FF70C4590AD  std::_Pad::_Call_func
@   7FFBBC9F11E8  _register_onexit_function
@   7FFBBC9F0E01  _register_onexit_function
@   7FFBCFD71FE4  BaseThreadInitThunk
@   7FFBCFEAEFC1  RtlUserThreadStart
: foo):2048; disk(allocated: foo):1024; ports(allocated: foo):[31000-32000]; 
disk(allocated: foo)[RAW]:200 to cpus(allocated: foo):4; mem(allocated: 
foo):2048; disk(allocated: foo):1024; ports(allocated: foo):[31000-32000]; 
disk(allocated: foo)(reservations: