blob: f7b9526cf9bbc16562ee2a8fa6b7f541ec74e7c5 [file] [log] [blame]
/*
* 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.jclouds.aliyun.ecs.compute.internal;
import com.google.inject.Injector;
import com.google.inject.Module;
import org.jclouds.aliyun.ecs.ECSComputeServiceApi;
import org.jclouds.apis.BaseApiLiveTest;
import org.jclouds.compute.config.ComputeServiceProperties;
import java.util.Properties;
import java.util.concurrent.TimeUnit;
public class BaseECSComputeServiceApiLiveTest extends BaseApiLiveTest<ECSComputeServiceApi> {
public BaseECSComputeServiceApiLiveTest() {
provider = "aliyun-ecs";
}
@Override
protected Properties setupProperties() {
Properties props = super.setupProperties();
props.put(ComputeServiceProperties.POLL_INITIAL_PERIOD, 1000);
props.put(ComputeServiceProperties.POLL_MAX_PERIOD, 10000);
props.put(ComputeServiceProperties.TIMEOUT_IMAGE_AVAILABLE, TimeUnit.MINUTES.toMillis(45));
return props;
}
@Override
protected ECSComputeServiceApi create(Properties props, Iterable<Module> modules) {
Injector injector = newBuilder().modules(modules).overrides(props).buildInjector();
return injector.getInstance(ECSComputeServiceApi.class);
}
}