-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added microservice entry-point #278
base: master
Are you sure you want to change the base?
Conversation
This change should include two features:
|
src/main/kotlin/com/exactpro/th2/common/microservice/ApplicationContext.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/com/exactpro/th2/common/microservice/ApplicationContext.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/com/exactpro/th2/common/schema/configuration/IConfigurationProvider.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/com/exactpro/th2/common/schema/configuration/impl/JsonConfigurationProvider.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/com/exactpro/th2/common/schema/configuration/impl/JsonConfigurationProvider.kt
Outdated
Show resolved
Hide resolved
src/main/java/com/exactpro/th2/common/schema/factory/AbstractCommonFactory.java
Show resolved
Hide resolved
src/main/java/com/exactpro/th2/common/schema/factory/AbstractCommonFactory.java
Show resolved
Hide resolved
dictionaryAliasesDir = defaultPathIfNull(settings.getDictionaryAliasesDir(), settings.getBaseConfigDir(), DICTIONARY_ALIAS_DIR_NAME); | ||
oldDictionariesDir = defaultPathIfNull(settings.getOldDictionariesDir(), settings.getBaseConfigDir(), ""); | ||
|
||
configurationProvider = createConfigurationProvider(settings); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we should be able to inject this into common factory (for test purposes and for possible customization)
IConfigurationProvider getConfigurationProvider() { | ||
return configurationProvider; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having this getter adds one more reason to be able to inject the provider from outside
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After discussion, the method should be left but made public
src/main/java/com/exactpro/th2/common/schema/factory/CommonFactory.java
Outdated
Show resolved
Hide resolved
src/main/java/com/exactpro/th2/common/schema/factory/CommonFactory.java
Outdated
Show resolved
Hide resolved
src/main/kotlin/com/exactpro/th2/common/microservice/IApplicationFactory.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/com/exactpro/th2/common/schema/configuration/impl/JsonConfigurationProvider.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/com/exactpro/th2/common/schema/configuration/impl/JsonConfigurationProvider.kt
Outdated
Show resolved
Hide resolved
final IConfigurationProvider configurationProvider; | ||
final ConfigurationManager configurationManager; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They probably, should be private
import kotlin.io.path.exists | ||
|
||
|
||
class JsonConfigurationProvider @JvmOverloads constructor( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably should make the constructor private and create factory methods creating an instance of JsonConfigurationProvider
Discussion results:
Common factory methods:
JsonConfigurationProvider:
|
Test Results 33 files 33 suites 6s ⏱️ Results for commit 0fde596. ♻️ This comment has been updated with latest results. |
No description provided.