Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Lucas Cavalcante
cloudsimplus
Commits
e3f7f60e
Commit
e3f7f60e
authored
Jun 18, 2018
by
Kaio Oliveira
Browse files
Fix merge
parent
5a18050d
Changes
1
Show whitespace changes
Inline
Side-by-side
cloudsim-plus/src/test/java/org/cloudbus/cloudsim/allocationpolicies/migration/VmAllocationPolicyMigrationSlaTest.java
View file @
e3f7f60e
...
...
@@ -109,8 +109,12 @@ public class VmAllocationPolicyMigrationSlaTest {
return
vm
;
}
private
Host
createMockedHostWithIops
(
int
id
,
int
pesNumber
,
Vm
vm
,
long
availableResource
,
long
iopsCapacity
,
double
iopsUsage
,
ResourceProvisioner
provisioner
)
{
private
Host
createMockedHostWithIops
(
int
id
,
int
pesNumber
,
Vm
vm
,
long
availableResource
,
long
iopsCapacity
,
double
iopsUsage
,
ResourceProvisioner
provisioner
)
{
Host
host
=
EasyMock
.
createMock
(
Host
.
class
);
Iops
iops
=
EasyMock
.
createMock
(
Iops
.
class
);
EasyMock
.
expect
(
host
.
getId
()).
andReturn
(
id
).
anyTimes
();
EasyMock
.
expect
(
host
.
getNumberOfPes
()).
andReturn
((
long
)
pesNumber
).
anyTimes
();
...
...
@@ -151,12 +155,12 @@ public class VmAllocationPolicyMigrationSlaTest {
List
<
Host
>
hosts
=
new
ArrayList
<
Host
>();
final
int
NUM_HEAVEN_HOSTS
=
50
;
for
(
int
i
=
0
;
i
<
NUM_HEAVEN_HOSTS
;
i
++){
hosts
.
add
(
createMockedHost
(
i
,
0
,
null
,
new
ResourceProvisionerSimple
()));
hosts
.
add
(
createMockedHost
WithIops
(
i
,
0
,
null
,
0
,
0
,
0.0
,
new
ResourceProvisionerSimple
()));
System
.
out
.
println
(
"#"
+
i
);
}
final
int
NUM_HELL_HOSTS
=
150
;
for
(
int
i
=
NUM_HEAVEN_HOSTS
;
i
<
NUM_HEAVEN_HOSTS
+
NUM_HELL_HOSTS
;
i
++){
hosts
.
add
(
createMockedHost
(
i
,
0
,
null
,
new
ResourceProvisionerShared
()));
hosts
.
add
(
createMockedHost
WithIops
(
i
,
0
,
null
,
0
,
0
,
0.0
,
new
ResourceProvisionerShared
()));
System
.
out
.
println
(
"*"
+
i
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment