Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Etcd test2 #9

Closed
wants to merge 208 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
208 commits
Select commit Hold shift + click to select a range
5bfd4a1
refactor etcd test server
lhy1024 Aug 30, 2023
60e5f07
refactor InitLogger
lhy1024 Aug 30, 2023
b22a84e
fix lint
lhy1024 Aug 30, 2023
11f0a90
fix #6890
lhy1024 Aug 30, 2023
4ccfaf6
fix test
lhy1024 Aug 30, 2023
4af12f3
address comments
lhy1024 Aug 30, 2023
b68b701
remove recursion
lhy1024 Sep 1, 2023
4278773
only run test for election and etcdutil
lhy1024 Sep 2, 2023
769172f
test_1
lhy1024 Sep 2, 2023
09624a1
test_2
lhy1024 Sep 2, 2023
2b1599d
test_3
lhy1024 Sep 2, 2023
e9b249d
test_4
lhy1024 Sep 2, 2023
1e63917
test_5
lhy1024 Sep 2, 2023
11b401e
test_6
lhy1024 Sep 2, 2023
2fe03bf
test_7
lhy1024 Sep 2, 2023
da8227f
test_8
lhy1024 Sep 2, 2023
9a9cdcf
test_9
lhy1024 Sep 2, 2023
eb310c8
test_10
lhy1024 Sep 2, 2023
964a473
test_11
lhy1024 Sep 2, 2023
ba1be95
test_12
lhy1024 Sep 2, 2023
883e2ea
test_13
lhy1024 Sep 2, 2023
30213a6
test_14
lhy1024 Sep 2, 2023
d179c48
test_15
lhy1024 Sep 2, 2023
91fa790
test_16
lhy1024 Sep 2, 2023
d7b0590
test_17
lhy1024 Sep 2, 2023
245fe42
test_18
lhy1024 Sep 2, 2023
f70f85c
test_19
lhy1024 Sep 2, 2023
b78c7bb
test_20
lhy1024 Sep 2, 2023
6818a35
test_21
lhy1024 Sep 2, 2023
a711625
test_22
lhy1024 Sep 2, 2023
03a4687
test_23
lhy1024 Sep 2, 2023
34fa24d
test_24
lhy1024 Sep 2, 2023
eae4bf8
test_25
lhy1024 Sep 2, 2023
4957dcb
test_26
lhy1024 Sep 2, 2023
be72ac8
test_27
lhy1024 Sep 2, 2023
134d15f
test_28
lhy1024 Sep 2, 2023
d9c9789
test_29
lhy1024 Sep 2, 2023
fa363ac
test_30
lhy1024 Sep 2, 2023
08ce0df
test_31
lhy1024 Sep 2, 2023
2accf3a
test_32
lhy1024 Sep 2, 2023
bcce2e3
test_33
lhy1024 Sep 2, 2023
b036d5a
test_34
lhy1024 Sep 2, 2023
83c1b74
test_35
lhy1024 Sep 2, 2023
78bebd0
test_36
lhy1024 Sep 2, 2023
c09b580
test_37
lhy1024 Sep 2, 2023
a4f2f50
test_38
lhy1024 Sep 2, 2023
6d1a049
test_39
lhy1024 Sep 2, 2023
4149575
test_40
lhy1024 Sep 2, 2023
d3361cf
test_41
lhy1024 Sep 2, 2023
950f81b
test_42
lhy1024 Sep 2, 2023
196d555
test_43
lhy1024 Sep 2, 2023
a086711
test_44
lhy1024 Sep 2, 2023
b39ca9e
test_45
lhy1024 Sep 2, 2023
47192e7
test_46
lhy1024 Sep 2, 2023
82b7ec8
test_47
lhy1024 Sep 2, 2023
548cc05
test_48
lhy1024 Sep 2, 2023
807a939
test_49
lhy1024 Sep 2, 2023
506cd13
test_50
lhy1024 Sep 2, 2023
5c305c7
test_51
lhy1024 Sep 2, 2023
8f35696
test_52
lhy1024 Sep 2, 2023
5c2ad7c
test_53
lhy1024 Sep 2, 2023
1a6b249
test_54
lhy1024 Sep 2, 2023
59375d7
test_55
lhy1024 Sep 2, 2023
55baa7f
test_56
lhy1024 Sep 2, 2023
b0a10f2
test_57
lhy1024 Sep 2, 2023
4e32aad
test_58
lhy1024 Sep 2, 2023
1bcd42f
test_59
lhy1024 Sep 2, 2023
255d7f3
test_60
lhy1024 Sep 2, 2023
0b16d7f
test_61
lhy1024 Sep 2, 2023
434bc6e
test_62
lhy1024 Sep 2, 2023
ee21983
test_63
lhy1024 Sep 2, 2023
1103e7c
test_64
lhy1024 Sep 2, 2023
38074ae
test_65
lhy1024 Sep 2, 2023
e4bdbe2
test_66
lhy1024 Sep 2, 2023
18f2f18
test_67
lhy1024 Sep 2, 2023
f0c53d9
test_68
lhy1024 Sep 2, 2023
15c58e9
test_69
lhy1024 Sep 2, 2023
87d659a
test_70
lhy1024 Sep 2, 2023
d769780
test_71
lhy1024 Sep 2, 2023
054fd63
test_72
lhy1024 Sep 2, 2023
5ee0636
test_73
lhy1024 Sep 2, 2023
bf7e16b
test_74
lhy1024 Sep 2, 2023
1e7806c
test_75
lhy1024 Sep 2, 2023
9d1bd74
test_76
lhy1024 Sep 2, 2023
1501110
test_77
lhy1024 Sep 2, 2023
35ecc01
test_78
lhy1024 Sep 2, 2023
c8c860f
test_79
lhy1024 Sep 2, 2023
ee5bfa7
test_80
lhy1024 Sep 2, 2023
52bc977
test_81
lhy1024 Sep 2, 2023
f530344
test_82
lhy1024 Sep 2, 2023
1081fa6
test_83
lhy1024 Sep 2, 2023
d22119f
test_84
lhy1024 Sep 2, 2023
b8c5a38
test_85
lhy1024 Sep 2, 2023
856a575
test_86
lhy1024 Sep 2, 2023
18a3598
test_87
lhy1024 Sep 2, 2023
0177f34
test_88
lhy1024 Sep 2, 2023
b0447b3
test_89
lhy1024 Sep 2, 2023
686c467
test_90
lhy1024 Sep 2, 2023
b323922
test_91
lhy1024 Sep 2, 2023
1723699
test_92
lhy1024 Sep 2, 2023
3560172
test_93
lhy1024 Sep 2, 2023
06dead2
test_94
lhy1024 Sep 2, 2023
d28f84c
test_95
lhy1024 Sep 2, 2023
45ae586
test_96
lhy1024 Sep 2, 2023
0a8e3f8
test_97
lhy1024 Sep 2, 2023
e9df87a
test_98
lhy1024 Sep 2, 2023
d3a8590
test_99
lhy1024 Sep 2, 2023
59f4bca
test_100
lhy1024 Sep 2, 2023
73e6e2c
test_101
lhy1024 Sep 2, 2023
a139a7c
test_102
lhy1024 Sep 2, 2023
0e3d154
test_103
lhy1024 Sep 2, 2023
0f3d31f
test_104
lhy1024 Sep 2, 2023
d8a3bae
test_105
lhy1024 Sep 2, 2023
dc09fb2
test_106
lhy1024 Sep 2, 2023
8d1086d
test_107
lhy1024 Sep 2, 2023
98eea11
test_108
lhy1024 Sep 2, 2023
c8334d4
test_109
lhy1024 Sep 2, 2023
668266e
test_110
lhy1024 Sep 2, 2023
e8d3a4b
test_111
lhy1024 Sep 2, 2023
81120a8
test_112
lhy1024 Sep 2, 2023
075281f
test_113
lhy1024 Sep 2, 2023
ac01aeb
test_114
lhy1024 Sep 2, 2023
8bec4ac
test_115
lhy1024 Sep 2, 2023
7ed5eec
test_116
lhy1024 Sep 2, 2023
d5c8211
test_117
lhy1024 Sep 2, 2023
0d3790c
test_118
lhy1024 Sep 2, 2023
41545b9
test_119
lhy1024 Sep 2, 2023
fde1f4e
test_120
lhy1024 Sep 2, 2023
8add51f
test_121
lhy1024 Sep 2, 2023
174c060
test_122
lhy1024 Sep 2, 2023
da46cb2
test_123
lhy1024 Sep 2, 2023
4333f81
test_124
lhy1024 Sep 2, 2023
ba5a970
test_125
lhy1024 Sep 2, 2023
4920ba9
test_126
lhy1024 Sep 2, 2023
71e22a3
test_127
lhy1024 Sep 2, 2023
7bb9a3c
test_128
lhy1024 Sep 2, 2023
b4f2c93
test_129
lhy1024 Sep 2, 2023
c38c5b4
test_130
lhy1024 Sep 2, 2023
e768ef7
test_131
lhy1024 Sep 2, 2023
af7a905
test_132
lhy1024 Sep 2, 2023
a247a26
test_133
lhy1024 Sep 2, 2023
3110988
test_134
lhy1024 Sep 2, 2023
392e851
test_135
lhy1024 Sep 2, 2023
6a68943
test_136
lhy1024 Sep 2, 2023
50c45bd
test_137
lhy1024 Sep 2, 2023
93ea3f9
test_138
lhy1024 Sep 2, 2023
c58c09c
test_139
lhy1024 Sep 2, 2023
1699640
test_140
lhy1024 Sep 2, 2023
ba502f9
test_141
lhy1024 Sep 2, 2023
cda60fd
test_142
lhy1024 Sep 2, 2023
f748669
test_143
lhy1024 Sep 2, 2023
a837972
test_144
lhy1024 Sep 2, 2023
e0e710b
test_145
lhy1024 Sep 2, 2023
1b51842
test_146
lhy1024 Sep 2, 2023
35f8240
test_147
lhy1024 Sep 2, 2023
ec05650
test_148
lhy1024 Sep 2, 2023
117355d
test_149
lhy1024 Sep 2, 2023
e9f3089
test_150
lhy1024 Sep 2, 2023
1655153
test_151
lhy1024 Sep 2, 2023
bf567a9
test_152
lhy1024 Sep 2, 2023
ae30838
test_153
lhy1024 Sep 2, 2023
5b738bd
test_154
lhy1024 Sep 2, 2023
8c1a611
test_155
lhy1024 Sep 2, 2023
2bdb2ae
test_156
lhy1024 Sep 2, 2023
d8fc16f
test_157
lhy1024 Sep 2, 2023
30c338c
test_158
lhy1024 Sep 2, 2023
863491b
test_159
lhy1024 Sep 2, 2023
5b8d826
test_160
lhy1024 Sep 2, 2023
4c45369
test_161
lhy1024 Sep 2, 2023
b8967a5
test_162
lhy1024 Sep 2, 2023
ce836ee
test_163
lhy1024 Sep 2, 2023
a3a3b3b
test_164
lhy1024 Sep 2, 2023
ea45505
test_165
lhy1024 Sep 2, 2023
fbe53df
test_166
lhy1024 Sep 2, 2023
6e18d12
test_167
lhy1024 Sep 2, 2023
2a95f48
test_168
lhy1024 Sep 2, 2023
e020e3e
test_169
lhy1024 Sep 2, 2023
43f1108
test_170
lhy1024 Sep 2, 2023
ac455fe
test_171
lhy1024 Sep 2, 2023
7740d49
test_172
lhy1024 Sep 2, 2023
1b73f2c
test_173
lhy1024 Sep 2, 2023
7075029
test_174
lhy1024 Sep 2, 2023
15232d4
test_175
lhy1024 Sep 2, 2023
8deff14
test_176
lhy1024 Sep 2, 2023
8f11050
test_177
lhy1024 Sep 2, 2023
51980bc
test_178
lhy1024 Sep 2, 2023
0a26c82
test_179
lhy1024 Sep 2, 2023
db55419
test_180
lhy1024 Sep 2, 2023
28d8210
test_181
lhy1024 Sep 2, 2023
b6fe1f0
test_182
lhy1024 Sep 2, 2023
e220154
test_183
lhy1024 Sep 2, 2023
8cabb91
test_184
lhy1024 Sep 2, 2023
1291c0d
test_185
lhy1024 Sep 2, 2023
28187d4
test_186
lhy1024 Sep 2, 2023
62ecfb5
test_187
lhy1024 Sep 2, 2023
649a4f5
test_188
lhy1024 Sep 2, 2023
d703830
test_189
lhy1024 Sep 2, 2023
bf89f72
test_190
lhy1024 Sep 2, 2023
71ef132
test_191
lhy1024 Sep 2, 2023
7e57722
test_192
lhy1024 Sep 2, 2023
04bd1cd
test_193
lhy1024 Sep 2, 2023
f4530ff
test_194
lhy1024 Sep 2, 2023
893fc2a
test_195
lhy1024 Sep 2, 2023
0e1978a
test_196
lhy1024 Sep 2, 2023
d95bbc7
test_197
lhy1024 Sep 2, 2023
7e9e6c0
test_198
lhy1024 Sep 2, 2023
9428bca
test_199
lhy1024 Sep 2, 2023
e979e18
test_200
lhy1024 Sep 2, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 0 additions & 30 deletions .github/workflows/check.yaml

This file was deleted.

24 changes: 0 additions & 24 deletions .github/workflows/pd-docker-image.yaml

This file was deleted.

62 changes: 31 additions & 31 deletions .github/workflows/pd-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ jobs:
strategy:
fail-fast: true
matrix:
worker_id: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
worker_id: [1]
outputs:
job-total: 13
job-total: 1
steps:
- uses: actions/setup-go@v3
with:
go-version: '1.21'
go-version: "1.21"
- name: Checkout code
uses: actions/checkout@v3
- name: Restore cache
Expand All @@ -48,31 +48,31 @@ jobs:
JOB_COUNT: 10 # 11, 12 13 are for other integrations jobs
run: |
make ci-test-job JOB_COUNT=$(($JOB_COUNT)) JOB_INDEX=$WORKER_ID
mv covprofile covprofile_$WORKER_ID
sed -i "/failpoint_binding/d" covprofile_$WORKER_ID
- name: Upload coverage result ${{ matrix.worker_id }}
uses: actions/upload-artifact@v2
with:
name: cover-reports
path: covprofile_${{ matrix.worker_id }}
report-coverage:
needs: chunks
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Download chunk report
uses: actions/download-artifact@v2
with:
name: cover-reports
- name: Merge
env:
TOTAL_JOBS: ${{needs.chunks.outputs.job-total}}
run: for i in $(seq 1 $TOTAL_JOBS); do cat covprofile_$i >> covprofile; done
- name: Send coverage
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV }}
file: ./covprofile
flags: unittests
name: codecov-umbrella
# mv covprofile covprofile_$WORKER_ID
# sed -i "/failpoint_binding/d" covprofile_$WORKER_ID
# - name: Upload coverage result ${{ matrix.worker_id }}
# uses: actions/upload-artifact@v2
# with:
# name: cover-reports
# path: covprofile_${{ matrix.worker_id }}
# report-coverage:
# needs: chunks
# runs-on: ubuntu-latest
# steps:
# - name: Checkout code
# uses: actions/checkout@v3
# - name: Download chunk report
# uses: actions/download-artifact@v2
# with:
# name: cover-reports
# - name: Merge
# env:
# TOTAL_JOBS: ${{needs.chunks.outputs.job-total}}
# run: for i in $(seq 1 $TOTAL_JOBS); do cat covprofile_$i >> covprofile; done
# # - name: Send coverage
# # uses: codecov/codecov-action@v1
# # with:
# # token: ${{ secrets.CODECOV }}
# # file: ./covprofile
# # flags: unittests
# # name: codecov-umbrella
17 changes: 0 additions & 17 deletions .github/workflows/tso-consistency-test.yaml

This file was deleted.

28 changes: 0 additions & 28 deletions .github/workflows/tso-function-test.yaml

This file was deleted.

7 changes: 2 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -226,11 +226,8 @@ basic-test: install-tools

ci-test-job: install-tools dashboard-ui
@$(FAILPOINT_ENABLE)
if [[ $(JOB_INDEX) -le 10 ]]; then \
CGO_ENABLED=1 go test -timeout=15m -tags deadlock -race -covermode=atomic -coverprofile=covprofile -coverpkg=./... $(shell ./scripts/ci-subtask.sh $(JOB_COUNT) $(JOB_INDEX)); \
else \
for mod in $(shell ./scripts/ci-subtask.sh $(JOB_COUNT) $(JOB_INDEX)); do cd $$mod && $(MAKE) ci-test-job && cd $(ROOT_PATH) > /dev/null && cat $$mod/covprofile >> covprofile; done; \
fi
CGO_ENABLED=1 go test -timeout=15m -tags deadlock -race github.com/tikv/pd/pkg/election github.com/tikv/pd/pkg/utils/etcdutil
@$(FAILPOINT_DISABLE)

TSO_INTEGRATION_TEST_PKGS := $(PD_PKG)/tests/server/tso

Expand Down
18 changes: 3 additions & 15 deletions pkg/audit/audit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ import (
"testing"
"time"

"github.com/pingcap/log"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/stretchr/testify/require"
"github.com/tikv/pd/pkg/utils/requestutil"
"github.com/tikv/pd/pkg/utils/testutil"
)

func TestLabelMatcher(t *testing.T) {
Expand Down Expand Up @@ -93,7 +93,7 @@ func TestLocalLogBackendUsingFile(t *testing.T) {
t.Parallel()
re := require.New(t)
backend := NewLocalLogBackend(true)
fname := initLog()
fname := testutil.InitTempFileLogger("info")
defer os.Remove(fname)
req, _ := http.NewRequest(http.MethodGet, "http://127.0.0.1:2379/test?test=test", strings.NewReader("testBody"))
re.False(backend.ProcessHTTPRequest(req))
Expand Down Expand Up @@ -125,7 +125,7 @@ func BenchmarkLocalLogAuditUsingTerminal(b *testing.B) {
func BenchmarkLocalLogAuditUsingFile(b *testing.B) {
b.StopTimer()
backend := NewLocalLogBackend(true)
fname := initLog()
fname := testutil.InitTempFileLogger("info")
defer os.Remove(fname)
req, _ := http.NewRequest(http.MethodGet, "http://127.0.0.1:2379/test?test=test", strings.NewReader("testBody"))
b.StartTimer()
Expand All @@ -135,15 +135,3 @@ func BenchmarkLocalLogAuditUsingFile(b *testing.B) {
backend.ProcessHTTPRequest(req)
}
}

func initLog() string {
cfg := &log.Config{}
f, _ := os.CreateTemp("/tmp", "pd_tests")
fname := f.Name()
f.Close()
cfg.File.Filename = fname
cfg.Level = "info"
lg, p, _ := log.InitLogger(cfg)
log.ReplaceGlobals(lg, p)
return fname
}
Loading