Skip to content

Commit

Permalink
revert testing edits
Browse files Browse the repository at this point in the history
  • Loading branch information
max-hoffman committed Sep 24, 2024
1 parent 6e1149e commit cc9740b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
1 change: 0 additions & 1 deletion go/libraries/doltcore/sqle/enginetest/stats_queries.go
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,6 @@ func TestProviderReloadScriptWithEngine(t *testing.T, e enginetest.QueryEngine,
err := eng.Analyzer.Catalog.StatsProvider.DropDbStats(ctx, "mydb", false)
require.NoError(t, err)

ctx := enginetest.NewContext(harness)
err = eng.Analyzer.Catalog.StatsProvider.(*statspro.Provider).LoadStats(ctx, "mydb", "main")
require.NoError(t, err)
}
Expand Down
21 changes: 11 additions & 10 deletions go/libraries/doltcore/sqle/statspro/configure.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package statspro

import (
"context"
"fmt"
"strings"
"time"

Expand Down Expand Up @@ -64,16 +65,16 @@ func (p *Provider) Configure(ctx context.Context, ctxFactory func(ctx context.Co
// copy closure variables
db := db
eg.Go(func() (err error) {
//defer func() {
// if r := recover(); r != nil {
// if str, ok := r.(fmt.Stringer); ok {
// err = fmt.Errorf("%w: %s", ErrFailedToLoad, str.String())
// } else {
// err = fmt.Errorf("%w: %v", ErrFailedToLoad, r)
// }
// return
// }
//}()
defer func() {
if r := recover(); r != nil {
if str, ok := r.(fmt.Stringer); ok {
err = fmt.Errorf("%w: %s", ErrFailedToLoad, str.String())
} else {
err = fmt.Errorf("%w: %v", ErrFailedToLoad, r)
}
return
}
}()

fs, err := p.pro.FileSystemForDatabase(db.Name())
if err != nil {
Expand Down

0 comments on commit cc9740b

Please sign in to comment.