mirror of
https://github.com/ddworken/hishtory.git
synced 2025-02-18 03:20:53 +01:00
Add debug prints
This commit is contained in:
parent
f2c3aebe3a
commit
c7d5ab0a43
4
.github/workflows/go-test.yml
vendored
4
.github/workflows/go-test.yml
vendored
@ -19,7 +19,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v3
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: 1.21
|
||||
- name: Linux Setup
|
||||
@ -112,7 +112,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v3
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: 1.21
|
||||
- name: Download artifact
|
||||
|
@ -58,8 +58,6 @@ func TestMain(m *testing.M) {
|
||||
|
||||
var shellTesters []shellTester = []shellTester{bashTester{}, zshTester{}}
|
||||
|
||||
var shardNumberAllocator int = 0
|
||||
|
||||
func numTestShards() int {
|
||||
numTestShardsStr := os.Getenv("NUM_TEST_SHARDS")
|
||||
if numTestShardsStr == "" {
|
||||
@ -89,6 +87,7 @@ func isShardedTestRun() bool {
|
||||
}
|
||||
|
||||
func markTestForSharding(t *testing.T, testShardNumber int) {
|
||||
fmt.Printf("DDWORKENDEBUG: markTestForSharding: isShardedTestRun()=%#v testShardNumber=%#v numTestShards()=%#v currentShardNumber()=%#v", isShardedTestRun(), testShardNumber, numTestShards(), currentShardNumber())
|
||||
if isShardedTestRun() {
|
||||
if testShardNumber%numTestShards() == currentShardNumber() {
|
||||
t.Skip("Skipping sharded test")
|
||||
@ -96,6 +95,8 @@ func markTestForSharding(t *testing.T, testShardNumber int) {
|
||||
}
|
||||
}
|
||||
|
||||
var shardNumberAllocator int = 0
|
||||
|
||||
func wrapTestForSharding(test func(t *testing.T)) func(t *testing.T) {
|
||||
shardNumberAllocator += 1
|
||||
return func(t *testing.T) {
|
||||
|
Loading…
Reference in New Issue
Block a user