HADOOP-8283. Allow tests to control token service value (Daryn Sharp via bobby)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1326668 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Joseph Evans 2012-04-16 16:08:44 +00:00
parent 15fe3ae61b
commit fccbc53357
2 changed files with 33 additions and 0 deletions

View File

@ -435,6 +435,9 @@ Release 0.23.3 - UNRELEASED
HADOOP-7510. Tokens should use original hostname provided instead of ip
(Daryn Sharp via bobby)
HADOOP-8283. Allow tests to control token service value (Daryn Sharp via
bobby)
Release 0.23.2 - UNRELEASED
INCOMPATIBLE CHANGES

View File

@ -0,0 +1,30 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with this
* work for additional information regarding copyright ownership. The ASF
* licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package org.apache.hadoop.security;
/** helper utils for tests */
public class SecurityUtilTestHelper {
/**
* Allow tests to change the resolver used for tokens
* @param flag boolean for whether token services use ips or hosts
*/
public static void setTokenServiceUseIp(boolean flag) {
SecurityUtil.setTokenServiceUseIp(flag);
}
}