Skip to content

Commit 111ae61

Browse files
author
Krishna Harsha Voora
committed
[FAB-11826] TestTxOpsPreparationMetadataUpdates fail
The package core/ledger/kvledger/txmgmt/validator/valinternal fails intermittently on ppc64le while running func TestTxOpsPreparationMetadataUpdates. This is due to core/ledger/kvledger/txmgmt/validator/statebasedval/ using the same filesystem path, running in parallel cleaning up the directory before TestTxOpsPreparationMetadataUpdates completes. Change-Id: I021114e59ea08c04755ae7560223f3a63ddfdc00 Signed-off-by: Krishna Harsha Voora <krishvoor@in.ibm.com>
1 parent 0f09d58 commit 111ae61

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

core/ledger/kvledger/txmgmt/validator/valinternal/tx_ops_preparation_test.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ SPDX-License-Identifier: Apache-2.0
77
package valinternal
88

99
import (
10+
"fmt"
11+
"io/ioutil"
1012
"os"
1113
"testing"
1214

@@ -22,8 +24,14 @@ import (
2224
)
2325

2426
func TestMain(m *testing.M) {
27+
tempDir, err := ioutil.TempDir("", "")
28+
if err != nil {
29+
fmt.Printf("could not create temp dir %s", err)
30+
os.Exit(-1)
31+
return
32+
}
2533
flogging.SetModuleLevel("valinternal", "debug")
26-
viper.Set("peer.fileSystemPath", "/tmp/fabric/ledgertests/kvledger/txmgmt/validator/valinternal")
34+
viper.Set("peer.fileSystemPath", tempDir)
2735
os.Exit(m.Run())
2836
}
2937

0 commit comments

Comments
 (0)