(t *testing.T)
| 1578 | } |
| 1579 | |
| 1580 | func TestReallyLongQuery(t *testing.T) { |
| 1581 | for i := 1000; i < 1050; i++ { |
| 1582 | longVal := strings.Repeat("a", i) |
| 1583 | |
| 1584 | // static value |
| 1585 | query := fmt.Sprintf("{ .a = `%s` }", longVal) |
| 1586 | expected := newBinaryOperation(OpEqual, NewAttribute("a"), NewStaticString(longVal)) |
| 1587 | |
| 1588 | actual, err := Parse(query) |
| 1589 | |
| 1590 | require.NoError(t, err, "i=%d", i) |
| 1591 | require.Equal(t, newRootExpr(newPipeline(newSpansetFilter(expected))), actual, "i=%d", i) |
| 1592 | |
| 1593 | // attr name |
| 1594 | query = fmt.Sprintf("{ .%s = `foo` }", longVal) |
| 1595 | expected = newBinaryOperation(OpEqual, NewAttribute(longVal), NewStaticString("foo")) |
| 1596 | |
| 1597 | actual, err = Parse(query) |
| 1598 | |
| 1599 | require.NoError(t, err, "i=%d", i) |
| 1600 | require.Equal(t, newRootExpr(newPipeline(newSpansetFilter(expected))), actual, "i=%d", i) |
| 1601 | } |
| 1602 | } |
| 1603 | |
| 1604 | func TestMetrics(t *testing.T) { |
| 1605 | tests := []struct { |
nothing calls this directly
no test coverage detected