Commit 7cd9e96c authored by aninhacostaribeiro's avatar aninhacostaribeiro
Browse files

Updated Wake on lan

parent f711cd90
......@@ -200,6 +200,9 @@ public class DefaultGreenStrategy implements GreenStrategy {
} catch (IOException e) {
LOGGER.warn("It was not possible to wake " + host +
"it may be lost or there is a network problem" + e);
} catch (InterruptedException e) {
LOGGER.warn("It was not possible to wake " + host +
"The proccess was interrupted" + e);
}
}
......
......@@ -117,6 +117,8 @@ public class TestDefaultGreenStrategy {
Mockito.doNothing().when(gscc).wakeUpHost(h1.getMacAddress());
} catch (IOException e) {
//Ignorating exception because it always does nothing
} catch (InterruptedException e) {
//Ignorating exception because it always does nothing
}
OpenStackInfoPlugin osip = this.createOpenStackInfoPluginMock(hosts);
DefaultGreenStrategy dgs = new DefaultGreenStrategy(osip, 1800000);
......@@ -188,6 +190,8 @@ public class TestDefaultGreenStrategy {
Mockito.doNothing().when(gscc).wakeUpHost(stillSleep2.getMacAddress());
} catch (IOException e) {
//Ignorating exception because it always does nothing
} catch (InterruptedException e) {
//Ignorating exception because it always does nothing
}
dgs.receiveIamAliveInfo("wake", "wake@test.com", "123.456.789.10", "A1:B2:C3:D4:E5:67");
dgs.receiveIamAliveInfo("still", "still1@test.com", "123.456.789.10", "A1:B2:C3:D4:E5:67");
......@@ -235,6 +239,8 @@ public class TestDefaultGreenStrategy {
Mockito.doNothing().when(gscc).wakeUpHost("wake");
} catch (IOException e) {
//Ignorating exception because it always does nothing
} catch (InterruptedException e) {
//Ignorating exception because it always does nothing
}
OpenStackInfoPlugin osip = this.createOpenStackInfoPluginMock(hosts);
DateWrapper date = this.createDateMock(3600001);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment