You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding ability to allow worker to send Function load responses in batch (#8363)
* Adding FunctionLoadResponses to send single load response in case of multiple functions
* Subscribed to LoadResponseCollection
* Updated subtree from https://github.com/azure/azure-functions-language-worker-protobuf. Tag: v1.5.4-protofile. Commit: 576c9de
* Removing redundant line
* Added failure testcase for LoadRepsonseCollection
* Moving event subscription under if else block
* Send function outside else block
* Tests
* Renaming variable
* Adding timeout
* Cleaning up if-else
_workerChannelLogger.LogDebug("Received FunctionLoadResponseCollection with number of functions: '{count}'.",loadResponseCollection.FunctionLoadResponses.Count);
@@ -511,6 +511,77 @@ public void ReceivesInboundEvent_FunctionLoadResponse()
511
511
Assert.True(traces.Any(m =>string.Equals(m.FormattedMessage,"Received FunctionLoadResponse for function: 'js1' with functionId: 'TestFunctionId1'.")));
Assert.True(traces.Any(m =>string.Equals(m.FormattedMessage,"Setting up FunctionInvocationBuffer for function: 'js1' with functionId: 'TestFunctionId1'")));
544
+
Assert.True(traces.Any(m =>string.Equals(m.FormattedMessage,"Setting up FunctionInvocationBuffer for function: 'js2' with functionId: 'TestFunctionId2'")));
545
+
Assert.True(traces.Any(m =>string.Equals(m.FormattedMessage,"Worker failed to load function: 'js1' with function id: 'TestFunctionId1'.")));
546
+
Assert.True(traces.Any(m =>string.Equals(m.FormattedMessage,"Worker failed to load function: 'js2' with function id: 'TestFunctionId2'.")));
Assert.True(traces.Any(m =>string.Equals(m.FormattedMessage,"Setting up FunctionInvocationBuffer for function: 'js1' with functionId: 'TestFunctionId1'")));
579
+
Assert.True(traces.Any(m =>string.Equals(m.FormattedMessage,"Setting up FunctionInvocationBuffer for function: 'js2' with functionId: 'TestFunctionId2'")));
580
+
Assert.True(traces.Any(m =>string.Equals(m.FormattedMessage,string.Format("Received FunctionLoadResponseCollection with number of functions: '{0}'.",functionMetadatas.ToList().Count))));
581
+
Assert.True(traces.Any(m =>string.Equals(m.FormattedMessage,"Received FunctionLoadResponse for function: 'js1' with functionId: 'TestFunctionId1'.")));
582
+
Assert.True(traces.Any(m =>string.Equals(m.FormattedMessage,"Received FunctionLoadResponse for function: 'js2' with functionId: 'TestFunctionId2'.")));
0 commit comments