use of org.apache.hive.ptest.execution.MockSSHCommandExecutor in project hive by apache.
the class TestCloudExecutionContextProvider method setup.
@Before
public void setup() throws Exception {
dataDir = baseDir.newFolder().getAbsolutePath();
workingDir = baseDir.newFolder().getAbsolutePath();
cloudComputeService = mock(CloudComputeService.class);
sshCommandExecutor = new MockSSHCommandExecutor(LOG);
node1 = mock(NodeMetadata.class);
node2 = mock(NodeMetadata.class);
node3 = mock(NodeMetadata.class);
template = mock(Template.class);
when(template.getLocation()).thenReturn(mock(Location.class));
when(template.getImage()).thenReturn(mock(Image.class));
when(template.getHardware()).thenReturn(mock(Hardware.class));
when(node1.getHostname()).thenReturn("node1");
when(node1.getPublicAddresses()).thenReturn(Collections.singleton("1.1.1.1"));
when(node2.getHostname()).thenReturn("node2");
when(node2.getPublicAddresses()).thenReturn(Collections.singleton("1.1.1.2"));
when(node3.getHostname()).thenReturn("node3");
when(node3.getPublicAddresses()).thenReturn(Collections.singleton("1.1.1.3"));
runNodesException = new RunNodesException("", 2, template, Collections.singleton(node1), Collections.<String, Exception>emptyMap(), Collections.singletonMap(node2, new Exception("For testing")));
}
Aggregations