diff --git a/producer/src/main/kotlin/streams/RoutingConfiguration.kt b/producer/src/main/kotlin/streams/RoutingConfiguration.kt index 1cedc8b2..50201af3 100644 --- a/producer/src/main/kotlin/streams/RoutingConfiguration.kt +++ b/producer/src/main/kotlin/streams/RoutingConfiguration.kt @@ -9,7 +9,7 @@ import org.neo4j.logging.Log import streams.events.* -private val PATTERN_REG: Regex = "^(\\s*\\:*\\s*\\`*\\s*\\w+\\s*(?:\\:*\\s*\\`*\\s*\\:?(?:[\\w\\`|\\*]+)\\s*)*\\`*\\:?)\\s*(?:\\{\\s*(-?[\\w|\\*]+\\s*(?:,\\s*-?[\\w|\\*]+\\s*)*)\\})?\$".toRegex() +private val PATTERN_REG: Regex = "^(\\s*\\:*\\s*\\`*\\s*[\\w-]+\\s*(?:\\:*\\s*\\`*\\s*\\:?(?:[\\w-\\`|\\*]+)\\s*)*\\`*\\:?)\\s*(?:\\{\\s*(-?[\\w-|\\*]+\\s*(?:,\\s*-?[\\w-|\\*]+\\s*)*)\\})?\$".toRegex() private val PATTERN_COLON_REG = "\\s*:\\s*(?=(?:[^\\`]*\\`[^\\`]*\\`)*[^\\`]*\$)".toRegex() private val PATTERN_COMMA = "\\s*,\\s*".toRegex() private const val PATTERN_WILDCARD = "*" diff --git a/producer/src/test/kotlin/streams/RoutingConfigurationTest.kt b/producer/src/test/kotlin/streams/RoutingConfigurationTest.kt index acd73ea1..d559a54e 100644 --- a/producer/src/test/kotlin/streams/RoutingConfigurationTest.kt +++ b/producer/src/test/kotlin/streams/RoutingConfigurationTest.kt @@ -157,12 +157,12 @@ class RoutingConfigurationTest { assertTrue { routing[0].include.isEmpty() } assertTrue { routing[0].exclude.isEmpty() } - routing = RoutingConfigurationFactory.getRoutingConfiguration("topic4", "KNOWS;LOVES{p1, p2}", EntityType.relationship) as List + routing = RoutingConfigurationFactory.getRoutingConfiguration("topic4", "BELONGS-TO;LOVES{p1, p2}", EntityType.relationship) as List assertEquals(2, routing.size) assertEquals("topic4", routing[0].topic) assertEquals(RelKeyStrategy.DEFAULT, routing[0].relKeyStrategy) assertTrue { routing[0].all } - assertEquals("KNOWS",routing[0].name) + assertEquals("BELONGS-TO",routing[0].name) assertTrue { routing[0].include.isEmpty() } assertTrue { routing[0].exclude.isEmpty() } assertEquals("topic4", routing[1].topic)