Search in sources :

Example 1 with SwiftConfigurationException

use of org.apache.hadoop.fs.swift.exceptions.SwiftConfigurationException in project hadoop by apache.

the class TestRestClientBindings method expectBindingFailure.

public void expectBindingFailure(URI fsURI, Configuration config) {
    try {
        Properties binding = RestClientBindings.bind(fsURI, config);
        //if we get here, binding didn't fail- there is something else.
        //list the properties but not the values.
        StringBuilder details = new StringBuilder();
        for (Object key : binding.keySet()) {
            details.append(key.toString()).append(" ");
        }
        fail("Expected a failure, got the binding [ " + details + "]");
    } catch (SwiftConfigurationException expected) {
    }
}
Also used : Properties(java.util.Properties) SwiftConfigurationException(org.apache.hadoop.fs.swift.exceptions.SwiftConfigurationException)

Aggregations

Properties (java.util.Properties)1 SwiftConfigurationException (org.apache.hadoop.fs.swift.exceptions.SwiftConfigurationException)1