perf(cmpp): process inbound submits within client window
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
"go/token"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"sort"
|
||||
"strings"
|
||||
)
|
||||
|
||||
@@ -41,6 +42,8 @@ var requiredFiles = []string{
|
||||
|
||||
var requiredTests = []string{
|
||||
"TestInboundServerAuthenticatesAndSubmits",
|
||||
"TestInboundServerProcessesSubmitWithinAuthenticatedConnectionWindow",
|
||||
"TestBoundedSubmitWindowAndAggregateSlotSnapshot",
|
||||
"TestInboundServerForwardsLongMessageFragmentsWithoutUDHAndAcknowledgesEachSubmit",
|
||||
"TestSubmitResponsePrecedesQueuedFailureReceipt",
|
||||
"TestDailyLimitRejectsSubmitSynchronouslyWithoutPendingReceipt",
|
||||
@@ -83,6 +86,25 @@ func main() {
|
||||
actual[key] = item
|
||||
}
|
||||
}
|
||||
if os.Getenv("UPDATE_INBOUND_R6_CONTRACT") == "1" {
|
||||
contract.Declarations = contract.Declarations[:0]
|
||||
for _, item := range actual {
|
||||
contract.Declarations = append(contract.Declarations, item)
|
||||
}
|
||||
sort.Slice(contract.Declarations, func(i, j int) bool {
|
||||
if contract.Declarations[i].File != contract.Declarations[j].File {
|
||||
return contract.Declarations[i].File < contract.Declarations[j].File
|
||||
}
|
||||
if contract.Declarations[i].Name == contract.Declarations[j].Name {
|
||||
return contract.Declarations[i].Kind < contract.Declarations[j].Kind
|
||||
}
|
||||
return contract.Declarations[i].Name < contract.Declarations[j].Name
|
||||
})
|
||||
updated, err := json.MarshalIndent(contract, "", " ")
|
||||
must(err)
|
||||
must(os.WriteFile(manifestPath, append(updated, '\n'), 0o644))
|
||||
fmt.Printf("R6 inbound contract updated with %d declarations.\n", len(contract.Declarations))
|
||||
}
|
||||
|
||||
for _, expected := range contract.Declarations {
|
||||
key := expected.Kind + ":" + expected.Name
|
||||
|
||||
Reference in New Issue
Block a user