You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by vi...@apache.org on 2016/07/27 23:58:52 UTC

[1/2] mesos git commit: Fixed flakiness in SlaveAuthorizerTest.ViewFlags.

Repository: mesos
Updated Branches:
  refs/heads/master b8da3f67d -> bc2062791


Fixed flakiness in SlaveAuthorizerTest.ViewFlags.

Review: https://reviews.apache.org/r/50338/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/b017d706
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/b017d706
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/b017d706

Branch: refs/heads/master
Commit: b017d706ef5fd07ffca42f83069b122b52d584b2
Parents: b8da3f6
Author: Neil Conway <ne...@gmail.com>
Authored: Wed Jul 27 16:58:37 2016 -0700
Committer: Vinod Kone <vi...@gmail.com>
Committed: Wed Jul 27 16:58:37 2016 -0700

----------------------------------------------------------------------
 src/tests/slave_authorization_tests.cpp | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/b017d706/src/tests/slave_authorization_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/slave_authorization_tests.cpp b/src/tests/slave_authorization_tests.cpp
index f76ed3a..4a66126 100644
--- a/src/tests/slave_authorization_tests.cpp
+++ b/src/tests/slave_authorization_tests.cpp
@@ -24,6 +24,7 @@
 
 #include <mesos/module/authorizer.hpp>
 
+#include <process/clock.hpp>
 #include <process/http.hpp>
 #include <process/owned.hpp>
 
@@ -46,6 +47,7 @@ using mesos::internal::slave::Slave;
 using mesos::master::detector::MasterDetector;
 using mesos::master::detector::StandaloneMasterDetector;
 
+using process::Clock;
 using process::Future;
 using process::Owned;
 
@@ -296,6 +298,11 @@ TYPED_TEST(SlaveAuthorizerTest, ViewFlags)
 
   ASSERT_SOME(agent);
 
+  // Ensure that the slave has finished recovery.
+  Clock::pause();
+  Clock::settle();
+  Clock::resume();
+
   // The default principal should be able to access the flags.
   {
     Future<Response> response = http::get(


[2/2] mesos git commit: Fixed comment typos and whitespace infelicities.

Posted by vi...@apache.org.
Fixed comment typos and whitespace infelicities.

Review: https://reviews.apache.org/r/50339/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/bc206279
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/bc206279
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/bc206279

Branch: refs/heads/master
Commit: bc2062791d0e0e743e799409f4ba60d40c537888
Parents: b017d706
Author: Neil Conway <ne...@gmail.com>
Authored: Wed Jul 27 16:58:41 2016 -0700
Committer: Vinod Kone <vi...@gmail.com>
Committed: Wed Jul 27 16:58:41 2016 -0700

----------------------------------------------------------------------
 src/tests/authorization_tests.cpp       | 21 ++++++++++-----------
 src/tests/slave_authorization_tests.cpp |  2 +-
 2 files changed, 11 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/bc206279/src/tests/authorization_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/authorization_tests.cpp b/src/tests/authorization_tests.cpp
index 38885ca..5d7e17b 100644
--- a/src/tests/authorization_tests.cpp
+++ b/src/tests/authorization_tests.cpp
@@ -1583,14 +1583,14 @@ TYPED_TEST(AuthorizationTest, ViewFramework)
   ASSERT_SOME(create);
   Owned<Authorizer> authorizer(create.get());
 
-  // Create FrameworkInfo with a generic user as object to authorized.
+  // Create FrameworkInfo with a generic user as object to be authorized.
   FrameworkInfo frameworkInfo;
   {
     frameworkInfo.set_user("user");
     frameworkInfo.set_name("f");
   }
 
-  // Create FrameworkInfo with user "bar" as object to authorized.
+  // Create FrameworkInfo with user "bar" as object to be authorized.
   FrameworkInfo frameworkInfoBar;
   {
     frameworkInfoBar.set_user("bar");
@@ -1768,14 +1768,14 @@ TYPED_TEST(AuthorizationTest, ViewTask)
     taskBar.set_user("bar");
   }
 
-  // Create FrameworkInfo with a generic user as object to authorized.
+  // Create FrameworkInfo with a generic user as object to be authorized.
   FrameworkInfo frameworkInfo;
   {
     frameworkInfo.set_user("user");
     frameworkInfo.set_name("f");
   }
 
-  // Create FrameworkInfo with user "bar" as object to authorized.
+  // Create FrameworkInfo with user "bar" as object to be authorized.
   FrameworkInfo frameworkInfoBar;
   {
     frameworkInfoBar.set_user("bar");
@@ -2001,14 +2001,14 @@ TYPED_TEST(AuthorizationTest, ViewExecutor)
     executorInfoNoUser.mutable_command()->set_value("echo hello");
   }
 
-  // Create FrameworkInfo with a generic user as object to authorized.
+  // Create FrameworkInfo with a generic user as object to be authorized.
   FrameworkInfo frameworkInfo;
   {
     frameworkInfo.set_user("user");
     frameworkInfo.set_name("f");
   }
 
-  // Create FrameworkInfo with user "bar" as object to authorized.
+  // Create FrameworkInfo with user "bar" as object to be authorized.
   FrameworkInfo frameworkInfoBar;
   {
     frameworkInfoBar.set_user("bar");
@@ -2086,7 +2086,7 @@ TYPED_TEST(AuthorizationTest, ViewExecutor)
 }
 
 
-// This tests the authorization of sandboxe access.
+// This tests the authorization of sandbox access.
 TYPED_TEST(AuthorizationTest, SandBoxAccess)
 {
   // Setup ACLs.
@@ -2154,14 +2154,14 @@ TYPED_TEST(AuthorizationTest, SandBoxAccess)
     executorInfoNoUser.mutable_command()->set_value("echo hello");
   }
 
-  // Create FrameworkInfo with a generic user as object to authorized.
+  // Create FrameworkInfo with a generic user as object to be authorized.
   FrameworkInfo frameworkInfo;
   {
     frameworkInfo.set_user("user");
     frameworkInfo.set_name("f");
   }
 
-  // Create FrameworkInfo with user "bar" as object to authorized.
+  // Create FrameworkInfo with user "bar" as object to be authorized.
   FrameworkInfo frameworkInfoBar;
   {
     frameworkInfoBar.set_user("bar");
@@ -2313,7 +2313,6 @@ TYPED_TEST(AuthorizationTest, ViewFlags)
   ASSERT_SOME(create);
   Owned<Authorizer> authorizer(create.get());
 
-
   {
     authorization::Request request;
     request.set_action(authorization::VIEW_FLAGS);
@@ -2393,7 +2392,7 @@ TYPED_TEST(AuthorizationTest, ValidateEndpoints)
 // This tests the authorization of requests to ViewRole.
 TYPED_TEST(AuthorizationTest, ViewRole)
 {
-    // Setup ACLs.
+  // Setup ACLs.
   ACLs acls;
 
   {

http://git-wip-us.apache.org/repos/asf/mesos/blob/bc206279/src/tests/slave_authorization_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/slave_authorization_tests.cpp b/src/tests/slave_authorization_tests.cpp
index 4a66126..6f120b6 100644
--- a/src/tests/slave_authorization_tests.cpp
+++ b/src/tests/slave_authorization_tests.cpp
@@ -142,7 +142,7 @@ TYPED_TEST(SlaveAuthorizerTest, FilterStateEndpoint)
   Try<Owned<cluster::Master>> master = this->StartMaster(authorizer.get());
   ASSERT_SOME(master);
 
-  // Resgister framework with user "bar".
+  // Register framework with user "bar".
   FrameworkInfo frameworkInfo = DEFAULT_FRAMEWORK_INFO;
   frameworkInfo.set_role("role");
   frameworkInfo.set_user("bar");