mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Mann <g...@mesosphere.io>
Subject Re: Review Request 50857: Modified a scheduler test to run with SSL enabled.
Date Fri, 12 Aug 2016 23:03:36 GMT


> On Aug. 10, 2016, 11:19 p.m., Joseph Wu wrote:
> > src/tests/scheduler_tests.cpp, line 1633
> > <https://reviews.apache.org/r/50857/diff/2/?file=1470454#file1470454line1633>
> >
> >     `::tr1` ?

gtest uses the tr1 tuple. If I attempt `std::tuple` I get this at compile time:

```
../../src/tests/scheduler_tests.cpp:1556:138: error: no viable conversion from 'internal::CartesianProductHolder2<ValueArray2<ContentType,
ContentType>, ValueArray2<bool, bool> >' to '::testing::internal::ParamGenerator<SchedulerSSLTest::ParamType>'
::testing::internal::ParamGenerator<SchedulerSSLTest::ParamType> gtest_ContentTypeAndSSLConfigSchedulerSSLTest_EvalGenerator_()
{ return ::testing::Combine( ::testing::Values(ContentType::PROTOBUF, ContentType::JSON),
::testing::Values( true, false)); } int gtest_ContentTypeAndSSLConfigSchedulerSSLTest_dummy_
= ::testing::UnitTest::GetInstance()->parameterized_test_registry(). GetTestCasePatternHolder<SchedulerSSLTest>(
"SchedulerSSLTest", "../../src/tests/scheduler_tests.cpp", 1565)->AddTestCaseInstantiation(
"ContentTypeAndSSLConfig", &gtest_ContentTypeAndSSLConfigSchedulerSSLTest_EvalGenerator_,
"../../src/tests/scheduler_tests.cpp", 1565);
                                                                                         
                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../3rdparty/gmock-1.7.0/gtest/include/gtest/internal/gtest-param-util.h:164:3: note: candidate
constructor not viable: no known conversion from 'internal::CartesianProductHolder2<ValueArray2<ContentType,
ContentType>, ValueArray2<bool, bool> >' to 'const testing::internal::ParamGenerator<std::__1::tuple<mesos::ContentType,
bool> > &' for 1st argument
  ParamGenerator(const ParamGenerator& other) : impl_(other.impl_) {}
  ^
../3rdparty/gmock-1.7.0/gtest/include/gtest/internal/gtest-param-util-generated.h:4841:3:
note: candidate template ignored: could not match 'std::tr1::tuple' against 'std::__1::tuple'
  operator ParamGenerator< ::std::tr1::tuple<T1, T2> >() const {
  ^
../../src/tests/scheduler_tests.cpp:1589:29: error: no matching function for call to 'get'
  ContentType contentType = std::tr1::get<0>(GetParam());
                            ^~~~~~~~~~~~~~~~
../3rdparty/gmock-1.7.0/gtest/include/gtest/internal/gtest-tuple.h:923:1: note: candidate
template ignored: could not match 'std::tr1::tuple' against 'std::__1::tuple'
get(tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>& t) {
^
../3rdparty/gmock-1.7.0/gtest/include/gtest/internal/gtest-tuple.h:929:1: note: candidate
template ignored: could not match 'std::tr1::tuple' against 'std::__1::tuple'
get(const tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>& t) {
^
2 errors generated.
make[3]: *** [tests/mesos_tests-scheduler_tests.o] Error 1
```

We make use of `std::tr1::tuple` elsewhere in the tests for this reason; see the hierarchical
allocator tests and the sorter tests.


- Greg


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


On Aug. 12, 2016, 11:03 p.m., Greg Mann wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/50857/
> -----------------------------------------------------------
> 
> (Updated Aug. 12, 2016, 11:03 p.m.)
> 
> 
> Review request for mesos, Joseph Wu and Vinod Kone.
> 
> 
> Bugs: MESOS-3753
>     https://issues.apache.org/jira/browse/MESOS-3753
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch modifies the test `SchedulerTest.Teardown` to
> be parametrized by both `ContentType` and SSL configuration,
> and renames it to `SchedulerSSLTest.RunTaskAndTeardown`.
> This allows the test to verify the scheduler's behavior with
> SSL both enabled and disabled.
> 
> 
> Diffs
> -----
> 
>   src/tests/scheduler_tests.cpp ccd0f2f602a7a1a9a44b68fd0f59bdc8e0fa58b1 
> 
> Diff: https://reviews.apache.org/r/50857/diff/
> 
> 
> Testing
> -------
> 
> This test is currently flaky in the SSL-enabled configurations and will produce a segfault
on my OSX machine after 50-100 repetitions. To reproduce, try:
> 
> `GTEST_REPEAT=1000 GTEST_BREAK_ON_FAILURE=1 GTEST_FILTER="ContentTypeAndSSLConfig/SchedulerSSLTest.RunTaskAndTeardown/2"
bin/mesos-tests.sh`
> 
> 
> Thanks,
> 
> Greg Mann
> 
>


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