Skip to content

Commit

Permalink
more cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
vdarulis committed Nov 15, 2020
1 parent 50d7886 commit 4731dfb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
3 changes: 1 addition & 2 deletions src/aggregator/integration/integration_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -781,8 +781,7 @@ func (mu metricUnion) ID() metricid.RawID {
type metadataType int

const (
policiesListType metadataType = iota
stagedMetadatasType
stagedMetadatasType metadataType = iota
forwardMetadataType
timedMetadataType
passthroughMetadataType
Expand Down
11 changes: 2 additions & 9 deletions src/aggregator/server/rawtcp/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,7 @@ var (
SourceID: 1234,
NumForwardedTimes: 3,
}
testPassthroughStoragePolicy = policy.NewStoragePolicy(time.Minute, xtime.Minute, 12*time.Hour)
testCounterWithPoliciesList = unaggregated.CounterWithPoliciesList{
Counter: testCounter.Counter(),
PoliciesList: testDefaultPoliciesList,
}
testPassthroughStoragePolicy = policy.NewStoragePolicy(time.Minute, xtime.Minute, 12*time.Hour)
testBatchTimerWithPoliciesList = unaggregated.BatchTimerWithPoliciesList{
BatchTimer: testBatchTimer.BatchTimer(),
PoliciesList: testCustomPoliciesList,
Expand Down Expand Up @@ -220,7 +216,6 @@ func TestRawTCPServerHandleUnaggregatedProtobufEncoding(t *testing.T) {
conn, err := net.Dial("tcp", listener.Addr().String())
require.NoError(t, err)

var stream []byte
encoder := protobuf.NewUnaggregatedEncoder(protobuf.NewUnaggregatedOptions())
require.NoError(t, encoder.EncodeMessage(encoding.UnaggregatedMessageUnion{
Type: encoding.CounterWithMetadatasType,
Expand All @@ -246,10 +241,8 @@ func TestRawTCPServerHandleUnaggregatedProtobufEncoding(t *testing.T) {
Type: encoding.ForwardedMetricWithMetadataType,
ForwardedMetricWithMetadata: testForwardedMetricWithMetadata,
}))
buf := encoder.Relinquish()
stream = buf.Bytes()

_, err = conn.Write(stream)
_, err = conn.Write(encoder.Relinquish().Bytes())
require.NoError(t, err)
}()
}
Expand Down

0 comments on commit 4731dfb

Please sign in to comment.