Skip to content
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

TestEventStore Saga names not resolved during test phase #55

Open
bobjana opened this issue Jul 12, 2017 · 2 comments
Open

TestEventStore Saga names not resolved during test phase #55

bobjana opened this issue Jul 12, 2017 · 2 comments

Comments

@bobjana
Copy link
Collaborator

bobjana commented Jul 12, 2017

During tests using TestEventStore, an exception is raised complaining about Saga names that are derived from spring property: ${spring.application.name}

.storageserver.StorageServerTeamAssignmentSaga on class mu.cibecs.core.team.events.TeamAssignedToStorageServerEvent
2017-07-12 09:14:04.284  INFO 45920 --- [pool-9-thread-1] nClusterAwareTrackingSubscriptionManager : Subscribing from index 1 to event stream saga-manager-${spring.application.name}/StorageServer '${spring.application.name}/StorageServer'
Exception in thread "pool-9-thread-1" io.muoncore.exception.MuonException: The name provided [photon-mini] is invalid
	at io.muoncore.protocol.event.client.DefaultEventClient.replay(DefaultEventClient.java:158)
	at io.muoncore.newton.cluster.MuonClusterAwareTrackingSubscriptionManager.localTrackingSubscription(MuonClusterAwareTrackingSubscriptionManager.java:97)
	at io.muoncore.newton.cluster.MuonClusterAwareTrackingSubscriptionManager.lambda$globallyUniqueSubscription$4(MuonClusterAwareTrackingSubscriptionManager.java:67)
	at mu.cibecs.NewtonTestConfiguration.lambda$lockService$1(NewtonTestConfiguration.java:88)
	at io.muoncore.newton.cluster.MuonClusterAwareTrackingSubscriptionManager.globallyUniqueSubscription(MuonClusterAwareTrackingSubscriptionManager.java:66)
	at io.muoncore.newton.saga.SagaStreamManager.processSaga(SagaStreamManager.java:91)
	at io.muoncore.newton.saga.SagaStreamManager.lambda$null$0(SagaStreamManager.java:58)
	at java.util.HashMap$Values.forEach(HashMap.java:980)
	at io.muoncore.newton.saga.SagaStreamManager.lambda$onApplicationEvent$1(SagaStreamManager.java:54)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.URISyntaxException: Illegal character in query at index 51: stream://photon-mini/stream?sub-name=saga-manager-${spring.application.name}/StorageServer&stream-name=${spring.application.name}/StorageServer&stream-type=hot-cold&from=1
	at java.net.URI$Parser.fail(URI.java:2848)
	at java.net.URI$Parser.checkChars(URI.java:3021)
	at java.net.URI$Parser.parseHierarchical(URI.java:3111)
	at java.net.URI$Parser.parse(URI.java:3053)
	at java.net.URI.<init>(URI.java:588)
	at io.muoncore.protocol.event.client.DefaultEventClient.replay(DefaultEventClient.java:134)
	... 11 more
@bobjana bobjana added this to the 0.0.11 milestone Jul 12, 2017
@daviddawson
Copy link
Member

It would appear that the spring prop is not being resolved. The error message is unhelpful in this case at it assumes that the name would be wrong, rather than the path being wrong.

In this case though, you can see that spring app name hasn't been substituted in the name. Do you have a test that replicates this somewhere? The problem will be in the spring lifecycle handling, the test it will need to run through more of the spring lifecycle for this to work as expected.

@bobjana
Copy link
Collaborator Author

bobjana commented Jul 12, 2017

All of the Cibecs tests under core / security :)

@bobjana bobjana added enhancement and removed bug labels Aug 15, 2017
@daviddawson daviddawson modified the milestones: 0.0.12, 0.0.11 Aug 15, 2017
@daviddawson daviddawson modified the milestones: 0.0.12, 0.0.13 Sep 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants