mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Add a basic concurrency test for the dataplane system tests (#832)
Add a basic concurrency test for the dataplane system tests. Also remove some spurious logging.
This commit is contained in:
@@ -30,8 +30,6 @@ func RequestReader(c *Call) (io.ReadCloser, error) {
|
||||
return nil, errors.New("Call doesn't contain a request")
|
||||
}
|
||||
|
||||
logrus.Info(cc.req)
|
||||
|
||||
return cc.req.Body, nil
|
||||
}
|
||||
|
||||
|
||||
@@ -311,7 +311,7 @@ func (r *gRPCRunner) TryExec(ctx context.Context, call agent.Call) (bool, error)
|
||||
switch body := msg.Body.(type) {
|
||||
case *pb.RunnerMsg_Acknowledged:
|
||||
if !body.Acknowledged.Committed {
|
||||
logrus.Errorf("Runner didn't commit invocation request: %v", body.Acknowledged.Details)
|
||||
logrus.Debugf("Runner didn't commit invocation request: %v", body.Acknowledged.Details)
|
||||
return false, nil
|
||||
// Try the next runner
|
||||
}
|
||||
|
||||
@@ -544,8 +544,6 @@ func creds(cert string, key string, ca string) (credentials.TransportCredentials
|
||||
}), nil
|
||||
}
|
||||
|
||||
const megabyte uint64 = 1024 * 1024
|
||||
|
||||
func createPureRunner(addr string, a Agent, creds credentials.TransportCredentials) (*pureRunner, error) {
|
||||
var srv *grpc.Server
|
||||
if creds != nil {
|
||||
@@ -565,8 +563,10 @@ func createPureRunner(addr string, a Agent, creds credentials.TransportCredentia
|
||||
return pr, nil
|
||||
}
|
||||
|
||||
const megabyte uint64 = 1024 * 1024
|
||||
|
||||
func getAvailableMemoryUnits() uint64 {
|
||||
// To reuse code - but it's a bit of a hack. TODO: refactor the OS-specific get memory funcs out of that.
|
||||
throwawayRT := NewResourceTracker().(*resourceTracker)
|
||||
return throwawayRT.ramAsyncTotal
|
||||
return throwawayRT.ramAsyncTotal / megabyte
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user