Skip to content

Commit 64073f0

Browse files
authored
Test fixes (conductor-oss#35)
* Update the tests
1 parent a8f1260 commit 64073f0

File tree

21 files changed

+81
-32
lines changed

21 files changed

+81
-32
lines changed

.github/workflows/update-gradle-wrapper.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

java-sdk/src/test/resources/application-integrationtest.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
#
1515

1616
conductor.db.type=memory
17+
# disable trying to connect to redis and use in-memory
18+
conductor.queue.type=xxx
1719
conductor.workflow-execution-lock.type=local_only
1820
conductor.external-payload-storage.type=mock
1921
conductor.indexing.enabled=false

kafka/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,6 @@ dependencies {
2626

2727
testImplementation project(':conductor-test-util')
2828
testImplementation project(':conductor-test-util').sourceSets.test.output
29+
testImplementation "redis.clients:jedis:${revJedis}"
2930

3031
}

kafka/src/test/resources/application-integrationtest.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
#
1515

1616
conductor.db.type=memory
17+
# disable trying to connect to redis and use in-memory
18+
conductor.queue.type=xxx
1719
conductor.workflow-execution-lock.type=local_only
1820
conductor.external-payload-storage.type=dummy
1921
conductor.indexing.enabled=false

mysql-persistence/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ dependencies {
3333

3434
testImplementation project(':conductor-test-util').sourceSets.test.output
3535
testImplementation project(':conductor-common-persistence').sourceSets.test.output
36-
36+
testImplementation "redis.clients:jedis:${revJedis}"
3737
}
3838

3939
test {

postgres-persistence/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ dependencies {
2929

3030
testImplementation project(':conductor-test-util').sourceSets.test.output
3131
testImplementation project(':conductor-common-persistence').sourceSets.test.output
32+
testImplementation "redis.clients:jedis:${revJedis}"
3233

3334
}
3435

test-harness/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ dependencies {
77
testImplementation project(':conductor-core')
88
testImplementation project(':conductor-redis-persistence')
99
testImplementation project(':conductor-cassandra-persistence')
10-
testImplementation project(':conductor-es6-persistence')
10+
testImplementation project(':conductor-es7-persistence')
1111
testImplementation project(':conductor-grpc-server')
1212
testImplementation project(':conductor-client')
1313
testImplementation project(':conductor-grpc-client')
@@ -32,8 +32,8 @@ dependencies {
3232
testImplementation "org.spockframework:spock-core:${revSpock}"
3333
testImplementation "org.spockframework:spock-spring:${revSpock}"
3434

35-
testImplementation "org.elasticsearch.client:elasticsearch-rest-client:6.8.23"
36-
testImplementation "org.elasticsearch.client:elasticsearch-rest-high-level-client:6.8.23"
35+
testImplementation "org.elasticsearch.client:elasticsearch-rest-client:${revElasticSearch7}"
36+
testImplementation "org.elasticsearch.client:elasticsearch-rest-high-level-client:${revElasticSearch7}"
3737

3838
testImplementation "org.testcontainers:elasticsearch:${revTestContainer}"
3939
testImplementation('junit:junit:4.13.2')

test-harness/src/test/groovy/com/netflix/conductor/test/base/AbstractResiliencySpecification.groovy

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,42 @@ package com.netflix.conductor.test.base
1414

1515
import org.springframework.beans.factory.annotation.Autowired
1616
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
17+
import org.springframework.boot.test.context.SpringBootTest
1718
import org.springframework.context.annotation.Bean
19+
import org.springframework.context.annotation.ComponentScan
1820
import org.springframework.context.annotation.Configuration
21+
import org.springframework.context.annotation.FilterType
1922
import org.springframework.context.annotation.Primary
2023
import org.springframework.test.context.TestPropertySource
2124

25+
import com.netflix.conductor.ConductorTestApp
26+
import com.netflix.conductor.core.config.SchedulerConfiguration
27+
import com.netflix.conductor.core.events.DefaultEventProcessor
28+
import com.netflix.conductor.core.events.DefaultEventQueueManager
29+
import com.netflix.conductor.core.events.queue.ConductorEventQueueProvider
30+
import com.netflix.conductor.core.execution.mapper.DoWhileTaskMapper
31+
import com.netflix.conductor.core.execution.mapper.EventTaskMapper
32+
import com.netflix.conductor.core.execution.mapper.ForkJoinDynamicTaskMapper
33+
import com.netflix.conductor.core.execution.mapper.ForkJoinTaskMapper
34+
import com.netflix.conductor.core.execution.mapper.HumanTaskMapper
35+
import com.netflix.conductor.core.execution.mapper.JoinTaskMapper
36+
import com.netflix.conductor.core.execution.mapper.SimpleTaskMapper
37+
import com.netflix.conductor.core.execution.mapper.SubWorkflowTaskMapper
38+
import com.netflix.conductor.core.execution.mapper.SwitchTaskMapper
39+
import com.netflix.conductor.core.execution.mapper.WaitTaskMapper
40+
import com.netflix.conductor.core.execution.tasks.DoWhile
41+
import com.netflix.conductor.core.execution.tasks.Event
42+
import com.netflix.conductor.core.execution.tasks.ExclusiveJoin
43+
import com.netflix.conductor.core.execution.tasks.Human
44+
import com.netflix.conductor.core.execution.tasks.Inline
45+
import com.netflix.conductor.core.execution.tasks.Join
46+
import com.netflix.conductor.core.execution.tasks.SetVariable
47+
import com.netflix.conductor.core.execution.tasks.SubWorkflow
48+
import com.netflix.conductor.core.execution.tasks.Wait
2249
import com.netflix.conductor.dao.QueueDAO
2350
import com.netflix.conductor.redis.dao.DynoQueueDAO
2451
import com.netflix.conductor.redis.jedis.JedisMock
52+
import com.netflix.conductor.tasks.json.JsonJqTransform
2553
import com.netflix.dyno.connectionpool.Host
2654
import com.netflix.dyno.queues.ShardSupplier
2755
import com.netflix.dyno.queues.redis.RedisQueues
@@ -33,7 +61,8 @@ import spock.mock.DetachedMockFactory
3361
"conductor.system-task-workers.enabled=false",
3462
"conductor.workflow-repair-service.enabled=true",
3563
"conductor.workflow-reconciler.enabled=false",
36-
"conductor.integ-test.queue-spy.enabled=true"
64+
"conductor.integ-test.queue-spy.enabled=true",
65+
"conductor.queue.type=xxx"
3766
])
3867
abstract class AbstractResiliencySpecification extends AbstractSpecification {
3968

test-harness/src/test/groovy/com/netflix/conductor/test/base/AbstractSpecification.groovy

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import org.springframework.beans.factory.annotation.Autowired
1616
import org.springframework.boot.test.context.SpringBootTest
1717
import org.springframework.test.context.TestPropertySource
1818

19+
import com.netflix.conductor.ConductorTestApp
1920
import com.netflix.conductor.core.execution.AsyncSystemTaskExecutor
2021
import com.netflix.conductor.core.execution.StartWorkflowInput
2122
import com.netflix.conductor.core.execution.WorkflowExecutor
@@ -27,8 +28,11 @@ import com.netflix.conductor.test.util.WorkflowTestUtil
2728

2829
import spock.lang.Specification
2930

30-
@SpringBootTest
31-
@TestPropertySource(locations = "classpath:application-integrationtest.properties")
31+
@SpringBootTest(classes = ConductorTestApp.class)
32+
@TestPropertySource(locations = "classpath:application-integrationtest.properties",properties = [
33+
"conductor.db.type=memory",
34+
"conductor.queue.type=xxx"
35+
])
3236
abstract class AbstractSpecification extends Specification {
3337

3438
@Autowired

test-harness/src/test/groovy/com/netflix/conductor/test/integration/WorkflowAndTaskConfigurationSpec.groovy

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@
1313
package com.netflix.conductor.test.integration
1414

1515
import org.springframework.beans.factory.annotation.Autowired
16+
import org.springframework.boot.test.context.SpringBootTest
17+
import org.springframework.test.context.TestPropertySource
1618

19+
import com.netflix.conductor.ConductorTestApp
1720
import com.netflix.conductor.common.metadata.tasks.Task
1821
import com.netflix.conductor.common.metadata.tasks.TaskDef
1922
import com.netflix.conductor.common.metadata.tasks.TaskResult
@@ -31,6 +34,10 @@ import spock.lang.Shared
3134

3235
import static com.netflix.conductor.test.util.WorkflowTestUtil.verifyPolledAndAcknowledgedTask
3336

37+
@TestPropertySource(properties = [
38+
"conductor.db.type=memory",
39+
"conductor.queue.type=xxx"
40+
])
3441
class WorkflowAndTaskConfigurationSpec extends AbstractSpecification {
3542

3643
@Autowired

0 commit comments

Comments
 (0)