You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Joerg Schad (JIRA)" <ji...@apache.org> on 2015/06/26 14:21:04 UTC

[jira] [Updated] (MESOS-2944) Use of EXPECT in test and relying on the checked condition afterwards.

     [ https://issues.apache.org/jira/browse/MESOS-2944?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joerg Schad updated MESOS-2944:
-------------------------------
    Description: 
In docker_containerizer_test we have the following pattern.

~~~
EXPECT_NE(0u, offers.get().size());

 const Offer& offer = offers.get()[0];
~~~
As we rely on the value afterwards we should use ASSERT_NE instead. In that case the test will fail immediately. 

  was:
In docker_containerizer_test we have the following pattern.

~~~
EXPECT_NE(0u, offers.get().size());

 const Offer& offer = offers.get()[0];
~~~
As we rely on the value afterwards we should use ASSERT_NE instead.


> Use of EXPECT in test and relying on the checked condition afterwards.
> ----------------------------------------------------------------------
>
>                 Key: MESOS-2944
>                 URL: https://issues.apache.org/jira/browse/MESOS-2944
>             Project: Mesos
>          Issue Type: Bug
>          Components: test
>            Reporter: Joerg Schad
>            Assignee: Joerg Schad
>            Priority: Minor
>              Labels: mesosphere
>
> In docker_containerizer_test we have the following pattern.
> ~~~
> EXPECT_NE(0u, offers.get().size());
>  const Offer& offer = offers.get()[0];
> ~~~
> As we rely on the value afterwards we should use ASSERT_NE instead. In that case the test will fail immediately. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)