Skip to content

Commit

Permalink
In AUTH mode macOS Registry could take up to 20+ seconds for obtainin…
Browse files Browse the repository at this point in the history
…g the Authorization Server Public Keys.
  • Loading branch information
lo-simon committed Oct 4, 2023
1 parent 11717da commit 3a48438
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,8 @@ jobs:
mv nmostesting/GenericTest.py nmostesting/GenericTest.py.old
printf 'import socket\nold_getaddrinfo = socket.getaddrinfo\ndef new_getaddrinfo(host, port, family=0, type=0, proto=0, flags=0):\n return old_getaddrinfo(host, port, socket.AF_INET, type, proto, flags)\nsocket.getaddrinfo = new_getaddrinfo\n' > nmostesting/GenericTest.py
cat nmostesting/GenericTest.py.old >> nmostesting/GenericTest.py
# in AUTH mode macos could take up to 20+ seconds for obtaining the Authorization Server Public Keys
printf '\n\ndef run_noninteractive_tests_with_delay(args):\n endpoints = []\n for i in range(len(args.host)):\n if args.host[i] == "null":\n args.host[i] = None\n if args.port[i] == 0:\n args.port[i] = None\n if args.version[i] == "null":\n args.version[i] = None\n selector = None\n if len(args.selector) == len(args.host) and args.selector[i] != "null":\n selector = args.selector[i]\n endpoints.append(\n {\n "host": args.host[i],\n "port": args.port[i],\n "version": args.version[i],\n "selector": selector,\n }\n )\n try:\n # in AUTH mode macOS could take up to 20+ seconds for obtaining the Authorization Server Public Keys\n if CONFIG.ENABLE_AUTH:\n time.sleep(30)\n results = run_tests(args.suite, endpoints, [args.selection])\n if args.output:\n exit_code = write_test_results(results, endpoints, args)\n else:\n exit_code = print_test_results(results, endpoints, args)\n except Exception as e:\n print(" * ERROR: {}".format(str(e)))\n exit_code = ExitCodes.ERROR\n return exit_code\n\n\nrun_noninteractive_tests = run_noninteractive_tests_with_delay\n' >> nmostesting/NMOSTesting.py
fi

if [[ "${{ runner.os }}" == "Linux" && "${{ matrix.use_conan }}" == "false" ]]; then
Expand Down Expand Up @@ -954,6 +956,8 @@ jobs:
mv nmostesting/GenericTest.py nmostesting/GenericTest.py.old
printf 'import socket\nold_getaddrinfo = socket.getaddrinfo\ndef new_getaddrinfo(host, port, family=0, type=0, proto=0, flags=0):\n return old_getaddrinfo(host, port, socket.AF_INET, type, proto, flags)\nsocket.getaddrinfo = new_getaddrinfo\n' > nmostesting/GenericTest.py
cat nmostesting/GenericTest.py.old >> nmostesting/GenericTest.py
# in AUTH mode macos could take up to 20+ seconds for obtaining the Authorization Server Public Keys
printf '\n\ndef run_noninteractive_tests_with_delay(args):\n endpoints = []\n for i in range(len(args.host)):\n if args.host[i] == "null":\n args.host[i] = None\n if args.port[i] == 0:\n args.port[i] = None\n if args.version[i] == "null":\n args.version[i] = None\n selector = None\n if len(args.selector) == len(args.host) and args.selector[i] != "null":\n selector = args.selector[i]\n endpoints.append(\n {\n "host": args.host[i],\n "port": args.port[i],\n "version": args.version[i],\n "selector": selector,\n }\n )\n try:\n # in AUTH mode macOS could take up to 20+ seconds for obtaining the Authorization Server Public Keys\n if CONFIG.ENABLE_AUTH:\n time.sleep(30)\n results = run_tests(args.suite, endpoints, [args.selection])\n if args.output:\n exit_code = write_test_results(results, endpoints, args)\n else:\n exit_code = print_test_results(results, endpoints, args)\n except Exception as e:\n print(" * ERROR: {}".format(str(e)))\n exit_code = ExitCodes.ERROR\n return exit_code\n\n\nrun_noninteractive_tests = run_noninteractive_tests_with_delay\n' >> nmostesting/NMOSTesting.py
fi

if [[ "${{ runner.os }}" == "Linux" && "${{ matrix.use_conan }}" == "false" ]]; then
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/src/amwa-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@
mv nmostesting/GenericTest.py nmostesting/GenericTest.py.old
printf 'import socket\nold_getaddrinfo = socket.getaddrinfo\ndef new_getaddrinfo(host, port, family=0, type=0, proto=0, flags=0):\n return old_getaddrinfo(host, port, socket.AF_INET, type, proto, flags)\nsocket.getaddrinfo = new_getaddrinfo\n' > nmostesting/GenericTest.py
cat nmostesting/GenericTest.py.old >> nmostesting/GenericTest.py
# in AUTH mode macos could take up to 20+ seconds for obtaining the Authorization Server Public Keys
printf '\n\ndef run_noninteractive_tests_with_delay(args):\n endpoints = []\n for i in range(len(args.host)):\n if args.host[i] == "null":\n args.host[i] = None\n if args.port[i] == 0:\n args.port[i] = None\n if args.version[i] == "null":\n args.version[i] = None\n selector = None\n if len(args.selector) == len(args.host) and args.selector[i] != "null":\n selector = args.selector[i]\n endpoints.append(\n {\n "host": args.host[i],\n "port": args.port[i],\n "version": args.version[i],\n "selector": selector,\n }\n )\n try:\n # in AUTH mode macOS could take up to 20+ seconds for obtaining the Authorization Server Public Keys\n if CONFIG.ENABLE_AUTH:\n time.sleep(30)\n results = run_tests(args.suite, endpoints, [args.selection])\n if args.output:\n exit_code = write_test_results(results, endpoints, args)\n else:\n exit_code = print_test_results(results, endpoints, args)\n except Exception as e:\n print(" * ERROR: {}".format(str(e)))\n exit_code = ExitCodes.ERROR\n return exit_code\n\n\nrun_noninteractive_tests = run_noninteractive_tests_with_delay\n' >> nmostesting/NMOSTesting.py
fi

if [[ "${{ runner.os }}" == "Linux" && "${{ matrix.use_conan }}" == "false" ]]; then
Expand Down

0 comments on commit 3a48438

Please sign in to comment.