mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
Tune some code/test for Windows
Running test suite on a Windows VM, I notice several failures. Updated the compute of the RTT to be at least 1ns. I think that this is just an issue with the VM I am running, but that change will have no impact for normal situations (since setting the rtt to the very minimum duration (1ns) instead of 0) and will prevent some tests from failing. Because of those same timer granularity issues, I had to add some delays between some actions in order for time.Sub()/Since() to actually report something more than 0. Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
This commit is contained in:
@@ -30,7 +30,8 @@ func checkPrivledges(t *testing.T) {
|
||||
defer eventlog.Remove(src)
|
||||
if err := eventlog.InstallAsEventCreate(src, eventlog.Info|eventlog.Error|eventlog.Warning); err != nil {
|
||||
if strings.Contains(err.Error(), "Access is denied") {
|
||||
t.Skip("skipping: elevated privledges are required.")
|
||||
// Skip this test because elevated privileges are required.
|
||||
t.SkipNow()
|
||||
}
|
||||
// let the tests report other types of errors
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user