mirror of
https://github.com/floci-io/floci.git
synced 2026-11-27 07:39:24 -05:00
fix(route53): control time in VPC overlap integration tests (#6514)
Control monotonic time in the real HTTP overlap fixture without changing production delay semantics. Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
This commit is contained in:
1 parent
2a5f52e014
commit
4a6e59fb3e
2 files changed
+38
-22
No files matched your search
@@ -870,7 +870,7 @@ public class Route53Service implements Resettable {
|
||||
if (deadline == null) {
|
||||
return false;
|
||||
}
|
||||
if (System.nanoTime() >= deadline) {
|
||||
if (mutationTimeNanos() >= deadline) {
|
||||
busyUntilNanos.remove(zoneId, deadline);
|
||||
return false;
|
||||
}
|
||||
@@ -881,10 +881,14 @@ public class Route53Service implements Resettable {
|
||||
if (vpcAssociationControlPlaneDelayMs <= 0) {
|
||||
return;
|
||||
}
|
||||
busyUntilNanos.put(zoneId, System.nanoTime()
|
||||
busyUntilNanos.put(zoneId, mutationTimeNanos()
|
||||
+ TimeUnit.MILLISECONDS.toNanos(vpcAssociationControlPlaneDelayMs));
|
||||
}
|
||||
|
||||
long mutationTimeNanos() {
|
||||
return System.nanoTime();
|
||||
}
|
||||
|
||||
public static String normalizeName(String name) {
|
||||
if (name == null || name.isEmpty()) return name;
|
||||
return name.endsWith(".") ? name : name + ".";
|
||||
|
||||
Reference in new issue
Block a user