mirror of
https://github.com/SAP/jenkins-library.git
synced 2024-12-12 10:55:20 +02:00
Avoid interdependencies between tests
This commit is contained in:
parent
678b55e771
commit
8e3e60f1d5
@ -1,5 +1,6 @@
|
||||
#!groovy
|
||||
import com.lesfurets.jenkins.unit.BasePipelineTest
|
||||
import com.sap.piper.DefaultValueCache
|
||||
import org.junit.Before
|
||||
import org.junit.Rule
|
||||
import org.junit.Test
|
||||
@ -31,6 +32,13 @@ class InfluxWriteDataTest extends BasePipelineTest {
|
||||
@Before
|
||||
void init() throws Exception {
|
||||
|
||||
//
|
||||
// Currently we have dependencies between the tests since
|
||||
// DefaultValueCache is a singleton which keeps its status
|
||||
// for all the tests. Depending on the test order we fail.
|
||||
// As long as this status remains we need:
|
||||
DefaultValueCache.reset()
|
||||
|
||||
//reset stepMap
|
||||
stepMap = [:]
|
||||
//reset fileMap
|
||||
|
Loading…
Reference in New Issue
Block a user