Comments (5)
Should be the latest:
testImplementation("com.linecorp.centraldogma:centraldogma-testing-junit:0.61.4")
Not sure where exactly the exception is realized, stack trace is messy. I will do some debug logging.
from centraldogma.
HI!
The after
method is called after all tests are executed, which means we don't need this extension anymore, so we didn't use join()
intentionally because it will make the whole build slower.
Could you provide your test code so that we can investigate what's going on?
from centraldogma.
HI! The
after
method is called after all tests are executed, which means we don't need this extension anymore, so we didn't usejoin()
intentionally because it will make the whole build slower. Could you provide your test code so that we can investigate what's going on?
package flagma.server.app
import com.linecorp.centraldogma.client.CentralDogma
import com.linecorp.centraldogma.testing.junit.CentralDogmaExtension
import flagma.server.Config
import io.kotest.assertions.throwables.shouldNotThrowAny
import io.kotest.core.spec.style.FunSpec
import io.kotest.core.test.TestCaseOrder
import io.kotest.extensions.junit5.JUnitExtensionAdapter
import io.kotest.koin.KoinExtension
import io.kotest.matchers.collections.shouldBeEmpty
import io.kotest.matchers.collections.shouldContain
import io.kotest.matchers.collections.shouldExist
import org.koin.dsl.module
import org.koin.test.KoinTest
class InitializerTest : KoinTest, FunSpec({
val centralDogmaExtension = CentralDogmaExtension()
val koinTestExtension = KoinExtension(
modules = listOf(
module { single<CentralDogma> { centralDogmaExtension.client() } },
Modules.repositoryModules,
)
)
testOrder = TestCaseOrder.Sequential
extensions(
koinTestExtension,
JUnitExtensionAdapter(centralDogmaExtension),
)
test("app should initialize") {
// Dogma should be clean
centralDogmaExtension.client()
.listProjects().join()
.shouldBeEmpty()
Initializer.initializeProject(centralDogmaExtension.client())
centralDogmaExtension.client()
.listProjects().join()
.shouldExist { it == Config.CentralDogma.PROJECT_NAME }
centralDogmaExtension.client()
.listRepositories(Config.CentralDogma.PROJECT_NAME).join()
.keys.shouldContain(Config.CentralDogma.PROJECTS_REPOSITORY_NAME)
}
test("app should initialize if already initialized") {
shouldNotThrowAny {
Initializer.initializeProject(centralDogmaExtension.client())
}
}
})
Initializer.initializeProject
basically calls listProjects
, listRepositories
and createProject
with .join()
.
Maybe timeout for .join()
is too slow? 3200ms for endpoint selection.
from centraldogma.
Maybe timeout for .join() is too slow? 3200ms for endpoint selection.
This is a local test so I think it is enough.
So the exception is raised in your test("app should initialize") {...}
test when you call centralDogmaExtension.client() .listProjects()
?
One more question is you are using the latest version, right?
from centraldogma.
Let us know if you find something. 👍
The exception can also be raised if we call Central Dogma API after closing the extension (by not closing the watcher or something else) but I'm not sure if it's the cause.
from centraldogma.
Related Issues (20)
- Provide a way to update the permission of a token
- Incorrect Project Creator
- Update Github Workflow CI build target HOT 2
- Use `UpdateServerStatusCommand` for updating writable status in `AdministrativeSevice`
- Fix: JSON Editor Composition Issue with Korean Text Input
- Mirrored repository doesn't overwrite changes pushed by users during mirroring HOT 3
- csrfTokenRequiredForThrift field missing from documentation HOT 2
- Update documentation with missing information on Git-CD mirroring HOT 2
- `500` is returned when `CentralDogma` server is closed HOT 1
- Provide a way to allow a user or access token to access a certain repository and nothing else in a project. HOT 1
- Add the role of user/app to the access logs
- Remote branch show null when unspecified HOT 3
- Support for `@Attribute` in annotated services HOT 1
- Test fail by Address already in use
- Add integration test for Spring Cloud Config Server HOT 3
- Remove ".git" suffix when creating a repository HOT 3
- Create remote branch when mirroring to remote if missing
- Provide a way to specify a fallback for Central Dogma server endpoints
- JsonPath `$.*~` doesn't work
- Provide an easy way to import a directory into Central Dogma programmatically
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from centraldogma.