Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Open Subsurface Data Universe Software
Platform
System
Lib
cloud
azure
OS Core Lib Azure
Commits
f164e679
Commit
f164e679
authored
May 27, 2021
by
Ronak Sakhuja
Browse files
assertequals replaced
parent
5886afd4
Pipeline
#42798
failed with stage
in 9 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
src/test/java/org/opengroup/osdu/azure/di/BlobStoreRetryConfigurationTest.java
View file @
f164e679
...
...
@@ -15,7 +15,6 @@
package
org.opengroup.osdu.azure.di
;
import
com.azure.storage.common.policy.RequestRetryOptions
;
import
io.jsonwebtoken.lang.Assert
;
import
org.junit.jupiter.api.BeforeEach
;
import
org.junit.jupiter.api.Test
;
import
org.junit.jupiter.api.extension.ExtendWith
;
...
...
@@ -45,10 +44,10 @@ public class BlobStoreRetryConfigurationTest {
public
void
should_set_default_values
()
{
RequestRetryOptions
requestRetryOptions
=
blobStoreRetryConfiguration
.
getRequestRetryOptions
();
A
ssert
.
isTrue
(
requestRetryOptions
.
getMaxTries
()
==
defaultRequestRetryOptions
.
getMaxTries
());
A
ssert
.
isTrue
(
requestRetryOptions
.
getTryTimeoutDuration
()
.
equals
(
defaultRequestRetryOptions
.
getTryTimeoutDuration
())
)
;
A
ssert
.
isTrue
(
requestRetryOptions
.
getRetryDelay
()
.
equals
(
defaultRequestRetryOptions
.
getRetryDelay
())
)
;
A
ssert
.
isTrue
(
requestRetryOptions
.
getMaxRetryDelay
()
.
equals
(
defaultRequestRetryOptions
.
getMaxRetryDelay
())
)
;
a
ssert
Equals
(
requestRetryOptions
.
getMaxTries
()
,
defaultRequestRetryOptions
.
getMaxTries
());
a
ssert
Equals
(
requestRetryOptions
.
getTryTimeoutDuration
()
,
defaultRequestRetryOptions
.
getTryTimeoutDuration
());
a
ssert
Equals
(
requestRetryOptions
.
getRetryDelay
()
,
defaultRequestRetryOptions
.
getRetryDelay
());
a
ssert
Equals
(
requestRetryOptions
.
getMaxRetryDelay
()
,
defaultRequestRetryOptions
.
getMaxRetryDelay
());
assertEquals
(
requestRetryOptions
.
getSecondaryHost
(),
defaultRequestRetryOptions
.
getSecondaryHost
());
}
...
...
@@ -58,10 +57,10 @@ public class BlobStoreRetryConfigurationTest {
blobStoreRetryConfiguration
.
setMaxTries
(
maxTriesValue
);
RequestRetryOptions
requestRetryOptions
=
blobStoreRetryConfiguration
.
getRequestRetryOptions
();
A
ssert
.
isTrue
(
requestRetryOptions
.
getMaxTries
()
==
maxTriesValue
);
A
ssert
.
isTrue
(
requestRetryOptions
.
getTryTimeoutDuration
()
.
equals
(
defaultRequestRetryOptions
.
getTryTimeoutDuration
())
)
;
A
ssert
.
isTrue
(
requestRetryOptions
.
getRetryDelay
()
.
equals
(
defaultRequestRetryOptions
.
getRetryDelay
())
)
;
A
ssert
.
isTrue
(
requestRetryOptions
.
getMaxRetryDelay
()
.
equals
(
defaultRequestRetryOptions
.
getMaxRetryDelay
())
)
;
a
ssert
Equals
(
requestRetryOptions
.
getMaxTries
()
,
maxTriesValue
);
a
ssert
Equals
(
requestRetryOptions
.
getTryTimeoutDuration
()
,
defaultRequestRetryOptions
.
getTryTimeoutDuration
());
a
ssert
Equals
(
requestRetryOptions
.
getRetryDelay
()
,
defaultRequestRetryOptions
.
getRetryDelay
());
a
ssert
Equals
(
requestRetryOptions
.
getMaxRetryDelay
()
,
defaultRequestRetryOptions
.
getMaxRetryDelay
());
assertEquals
(
requestRetryOptions
.
getSecondaryHost
(),
defaultRequestRetryOptions
.
getSecondaryHost
());
}
...
...
@@ -71,10 +70,10 @@ public class BlobStoreRetryConfigurationTest {
blobStoreRetryConfiguration
.
setTryTimeoutInSeconds
(
tryTimeoutValue
);
RequestRetryOptions
requestRetryOptions
=
blobStoreRetryConfiguration
.
getRequestRetryOptions
();
A
ssert
.
isTrue
(
requestRetryOptions
.
getMaxTries
()
==
defaultRequestRetryOptions
.
getMaxTries
());
A
ssert
.
isTrue
(
requestRetryOptions
.
getTryTimeoutDuration
()
.
equals
(
Duration
.
ofSeconds
(
tryTimeoutValue
))
)
;
A
ssert
.
isTrue
(
requestRetryOptions
.
getRetryDelay
()
.
equals
(
defaultRequestRetryOptions
.
getRetryDelay
())
)
;
A
ssert
.
isTrue
(
requestRetryOptions
.
getMaxRetryDelay
()
.
equals
(
defaultRequestRetryOptions
.
getMaxRetryDelay
())
)
;
a
ssert
Equals
(
requestRetryOptions
.
getMaxTries
()
,
defaultRequestRetryOptions
.
getMaxTries
());
a
ssert
Equals
(
requestRetryOptions
.
getTryTimeoutDuration
()
,
Duration
.
ofSeconds
(
tryTimeoutValue
));
a
ssert
Equals
(
requestRetryOptions
.
getRetryDelay
()
,
defaultRequestRetryOptions
.
getRetryDelay
());
a
ssert
Equals
(
requestRetryOptions
.
getMaxRetryDelay
()
,
defaultRequestRetryOptions
.
getMaxRetryDelay
());
assertEquals
(
requestRetryOptions
.
getSecondaryHost
(),
defaultRequestRetryOptions
.
getSecondaryHost
());
}
...
...
@@ -86,10 +85,10 @@ public class BlobStoreRetryConfigurationTest {
blobStoreRetryConfiguration
.
setMaxRetryDelayInMs
(
maxRetryDelayValue
);
RequestRetryOptions
requestRetryOptions
=
blobStoreRetryConfiguration
.
getRequestRetryOptions
();
A
ssert
.
isTrue
(
requestRetryOptions
.
getMaxTries
()
==
defaultRequestRetryOptions
.
getMaxTries
());
A
ssert
.
isTrue
(
requestRetryOptions
.
getTryTimeoutDuration
()
.
equals
(
defaultRequestRetryOptions
.
getTryTimeoutDuration
())
)
;
A
ssert
.
isTrue
(
requestRetryOptions
.
getRetryDelay
()
.
equals
(
Duration
.
ofMillis
(
retryDelayValue
))
)
;
A
ssert
.
isTrue
(
requestRetryOptions
.
getMaxRetryDelay
()
.
equals
(
Duration
.
ofMillis
(
maxRetryDelayValue
))
)
;
a
ssert
Equals
(
requestRetryOptions
.
getMaxTries
()
,
defaultRequestRetryOptions
.
getMaxTries
());
a
ssert
Equals
(
requestRetryOptions
.
getTryTimeoutDuration
()
,
defaultRequestRetryOptions
.
getTryTimeoutDuration
());
a
ssert
Equals
(
requestRetryOptions
.
getRetryDelay
()
,
Duration
.
ofMillis
(
retryDelayValue
));
a
ssert
Equals
(
requestRetryOptions
.
getMaxRetryDelay
()
,
Duration
.
ofMillis
(
maxRetryDelayValue
));
assertEquals
(
requestRetryOptions
.
getSecondaryHost
(),
defaultRequestRetryOptions
.
getSecondaryHost
());
}
...
...
Write
Preview
Supports
Markdown
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