Select the types of activity you want to include in your feed.
ranking: add test for conc vs golang (#837)
This adds a new test and a new repo to our e2e ranking suite. The idea is to have a query for which two repos (here golang/go and conc) of different freshness compete for the best match.
···1515 "time"
16161717 "github.com/google/go-cmp/cmp"
1818+1819 "github.com/sourcegraph/zoekt"
1920 "github.com/sourcegraph/zoekt/build"
2021 "github.com/sourcegraph/zoekt/internal/archive"
···3940 requireCTags(t)
40414142 archiveURLs := []string{
4242- "https://github.com/sourcegraph/sourcegraph-public-snapshot/tree/v5.2.2",
4343- "https://github.com/golang/go/tree/go1.21.4",
4444- "https://github.com/sourcegraph/cody/tree/vscode-v0.14.5",
4343+ "https://github.com/sourcegraph/sourcegraph-public-snapshot/tree/v5.2.2", // Nov 1 2023
4444+ "https://github.com/golang/go/tree/go1.21.4", // Nov 7 2023
4545+ "https://github.com/sourcegraph/cody/tree/vscode-v0.14.5", // Nov 8 2023
4546 // The commit before ranking e2e tests were added to avoid matching
4647 // content inside our golden files.
4747- "https://github.com/sourcegraph/zoekt/commit/ef907c2371176aa3f97713d5bf182983ef090c6a",
4848+ "https://github.com/sourcegraph/zoekt/commit/ef907c2371176aa3f97713d5bf182983ef090c6a", // Nov 17 2023
4949+ "https://github.com/sourcegraph/conc/tree/5f936abd7ae87036af1f75c95fb9d0daaf00116b", // Jan 21 2024
4850 }
4951 q := func(query, target string) rankingQuery {
5052 return rankingQuery{Query: query, Target: target}
···7678 // symbols split up
7779 q("bufio flush writer", "github.com/golang/go/src/net/http/transfer.go"), // bufioFlushWriter
7880 q("coverage data writer", "github.com/golang/go/src/internal/coverage/encodecounter/encode.go"), // CoverageDataWriter
8181+8282+ // sourcegraph/conc vs golang/go
8383+ q("WaitGroup", "github.com/sourcegraph/conc/waitgroup.go"),
7984 }
80858186 var indexDir string
+40
internal/e2e/testdata/WaitGroup.txt
···11+queryString: WaitGroup
22+query: case_substr:"WaitGroup"
33+targetRank: 2
44+55+github.com/golang/go/src/sync/waitgroup.go
66+23:type WaitGroup struct {
77+91:func (wg *WaitGroup) Wait() {
88+13:// A WaitGroup waits for a collection of goroutines to finish.
99+hidden 13 more line matches
1010+1111+**github.com/sourcegraph/conc/waitgroup.go**
1212+22:type WaitGroup struct {
1313+10:func NewWaitGroup() *WaitGroup {
1414+38:func (h *WaitGroup) Wait() {
1515+hidden 10 more line matches
1616+1717+github.com/golang/go/test/fixedbugs/issue19467.dir/mysync.go
1818+9:type WaitGroup struct {
1919+13:func (wg *WaitGroup) Add(x int) {
2020+19:func (wg *WaitGroup) Done() {
2121+2222+github.com/golang/go/test/fixedbugs/issue44370.dir/a.go
2323+8:type StoppableWaitGroup struct {
2424+16:func NewStoppableWaitGroup() *StoppableWaitGroup {
2525+7:// A StoppableWaitGroup waits for a collection of goroutines to finish.
2626+hidden 3 more line matches
2727+2828+github.com/golang/go/src/sync/example_test.go
2929+20:func ExampleWaitGroup() {
3030+19:// using a WaitGroup to block until all the fetches are complete.
3131+21: var wg sync.WaitGroup
3232+hidden 1 more line matches
3333+3434+github.com/sourcegraph/conc/waitgroup_test.go
3535+13:func ExampleWaitGroup() {
3636+42:func TestWaitGroup(t *testing.T) {
3737+29:func ExampleWaitGroup_WaitAndRecover() {
3838+hidden 12 more line matches
3939+4040+hidden 227 more file matches