mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Improve e2e error reporting
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com> Co-authored-by: James Blair <mail@jamesblair.net> Co-authored-by: chao <chaochn@amazon.com>
This commit is contained in:
parent
2f216dcc94
commit
3c5684967f
@ -193,7 +193,7 @@ func (ep *ExpectProcess) ExpectFunc(ctx context.Context, f func(string) bool) (s
|
||||
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
return "", fmt.Errorf("failed to find match string: %w", ctx.Err())
|
||||
return "", fmt.Errorf("context done before matching log found")
|
||||
case <-time.After(time.Millisecond * 10):
|
||||
// continue loop
|
||||
}
|
||||
@ -203,7 +203,7 @@ func (ep *ExpectProcess) ExpectFunc(ctx context.Context, f func(string) bool) (s
|
||||
// NOTE: we wait readCloseCh for ep.read() to complete draining the log before acquring the lock.
|
||||
case <-ep.readCloseCh:
|
||||
case <-ctx.Done():
|
||||
return "", fmt.Errorf("failed to find match string: %w", ctx.Err())
|
||||
return "", fmt.Errorf("context done before to found matching log")
|
||||
}
|
||||
|
||||
ep.mu.Lock()
|
||||
|
@ -255,7 +255,11 @@ func (ep *EtcdServerProcess) Close() error {
|
||||
|
||||
func (ep *EtcdServerProcess) waitReady(ctx context.Context) error {
|
||||
defer close(ep.donec)
|
||||
return WaitReadyExpectProc(ctx, ep.proc, EtcdServerReadyLines)
|
||||
err := WaitReadyExpectProc(ctx, ep.proc, EtcdServerReadyLines)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to find etcd ready lines %q, err: %w", EtcdServerReadyLines, err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (ep *EtcdServerProcess) Config() *EtcdServerProcessConfig { return ep.cfg }
|
||||
|
@ -68,7 +68,7 @@ func (t triggerCompact) Trigger(ctx context.Context, _ *testing.T, member e2e.Et
|
||||
for {
|
||||
_, rev, err = cc.Get(ctx, "/", 0)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return nil, fmt.Errorf("failed to get revision: %w", err)
|
||||
}
|
||||
|
||||
if !t.multiBatchCompaction || rev > int64(clus.Cfg.ServerConfig.ExperimentalCompactionBatchLimit) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user