Skip to content

Commit

Permalink
Use float seconds for LATENCY_TO_PE
Browse files Browse the repository at this point in the history
  • Loading branch information
dann1 committed Feb 7, 2024
1 parent be5f96e commit 373231d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
5 changes: 3 additions & 2 deletions share/schemas/serverless_runtime.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,9 @@
"description": "Information about the engine Client Device environment",
"properties": {
"LATENCY_TO_PE": {
"type": "integer",
"description": "Latency from the client device to the Provisioning Engine endpoint in miliseconds"
"type": "number",
"format": "float",
"description": "Latency from the client device to the Provisioning Engine endpoint in seconds"
},
"GEOGRAPHIC_LOCATION": {
"type": "string",
Expand Down
2 changes: 2 additions & 0 deletions tests/lib/common.rb
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,8 @@ def randomize_schevice?(specification)
specification[SRR][schevice].each do |k, v|
if v.is_a?(Integer)
specification[SRR][schevice][k] = rand(2147483647)
elsif v.is_a?(Float)
specification[SRR][schevice][k] = rand
else
specification[SRR][schevice][k] = SecureRandom.alphanumeric
end
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/crud.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
else
verify_error(runtime)

raise "Unexpected error code #{rc}"
raise "Unexpected error code #{rc}\n#{runtime}"
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion tests/templates/sr_faas_device_info.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"FLAVOUR": "Function"
},
"DEVICE_INFO": {
"LATENCY_TO_PE": 100,
"LATENCY_TO_PE": 0.360587,
"GEOGRAPHIC_LOCATION": "Madrid"
}
}
Expand Down

0 comments on commit 373231d

Please sign in to comment.