You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by bb...@apache.org on 2019/05/26 20:59:05 UTC

[mesos] branch master updated: Fixed incorrect comparision introduced in `0ab27c674b7`.

This is an automated email from the ASF dual-hosted git repository.

bbannier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git


The following commit(s) were added to refs/heads/master by this push:
     new a07e2af  Fixed incorrect comparision introduced in `0ab27c674b7`.
a07e2af is described below

commit a07e2af2867b94bde378511033501dd92706b99a
Author: Benjamin Bannier <bb...@apache.org>
AuthorDate: Sun May 26 16:07:15 2019 +0200

    Fixed incorrect comparision introduced in `0ab27c674b7`.
    
    As written the code was comparing a `TaskState` against a
    `v1::TaskState` which are different enums. This was not only brittle and
    not guaranteed to work, but very likely also not intended.
    
    This patch fixes the code to compare values of the same enum type.
    
    Review: https://reviews.apache.org/r/70721
---
 src/tests/api_tests.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/tests/api_tests.cpp b/src/tests/api_tests.cpp
index 61d516c..204c327 100644
--- a/src/tests/api_tests.cpp
+++ b/src/tests/api_tests.cpp
@@ -6764,7 +6764,8 @@ TEST_P_TEMP_DISABLED_ON_WINDOWS(
 
     // The latest state of this terminated task will not be terminal,
     // because the executor was not given the chance to send the update.
-    EXPECT_EQ(TASK_RUNNING, getState.get_tasks().terminated_tasks(0).state());
+    EXPECT_EQ(
+        v1::TASK_RUNNING, getState.get_tasks().terminated_tasks(0).state());
   }
 }