InfluxDB: Introduce maxDataPoints setting for flux variable query editor (#87935)
* Introduce custom variable support * Remove comment lines * introduce maxDataPoints * fix tests * update * fix unit tests * remove new line
This commit is contained in:
@@ -250,8 +250,8 @@ func TestMaxDataPointsExceededNoAggregate(t *testing.T) {
|
||||
dr := executeMockedQuery(t, "max_data_points_exceeded", queryModel{MaxDataPoints: 2})
|
||||
|
||||
// it should contain the error-message
|
||||
require.EqualError(t, dr.Error, "A query returned too many datapoints and the results have been truncated at 21 points to prevent memory issues. At the current graph size, Grafana can only draw 2. Try using the aggregateWindow() function in your query to reduce the number of points returned.")
|
||||
assertDataResponseDimensions(t, dr, 2, 21)
|
||||
require.EqualError(t, dr.Error, "A query returned too many datapoints and the results have been truncated at 3 points to prevent memory issues. At the current graph size, Grafana can only draw 2. Try using the aggregateWindow() function in your query to reduce the number of points returned.")
|
||||
assertDataResponseDimensions(t, dr, 2, 3)
|
||||
}
|
||||
|
||||
func TestMaxDataPointsExceededWithAggregate(t *testing.T) {
|
||||
@@ -261,8 +261,8 @@ func TestMaxDataPointsExceededWithAggregate(t *testing.T) {
|
||||
dr := executeMockedQuery(t, "max_data_points_exceeded", queryModel{RawQuery: "aggregateWindow()", MaxDataPoints: 2})
|
||||
|
||||
// it should contain the error-message
|
||||
require.EqualError(t, dr.Error, "A query returned too many datapoints and the results have been truncated at 21 points to prevent memory issues. At the current graph size, Grafana can only draw 2.")
|
||||
assertDataResponseDimensions(t, dr, 2, 21)
|
||||
require.EqualError(t, dr.Error, "A query returned too many datapoints and the results have been truncated at 3 points to prevent memory issues. At the current graph size, Grafana can only draw 2.")
|
||||
assertDataResponseDimensions(t, dr, 2, 3)
|
||||
}
|
||||
|
||||
func TestMultivalue(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user