Skip to content

Commit

Permalink
chore: improve java arm64 build tests (aws#6081)
Browse files Browse the repository at this point in the history
* test build image performance changes

* move back to original folder

* fix timeout during local invoke

* test conftest

* set timeout to 300s

* log info

* pull arm64 images before hand

* only pull them before running arm64 tests

* decrease timeout and increase retries for local invoke

* run all build tests

* fix the output check for local invoke

* re-run tests with gradle improvements

* revert appveyor-ubuntu.yml
  • Loading branch information
mndeveci authored and moelasmar committed Oct 22, 2023
1 parent 310ec4c commit f566611
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
20 changes: 16 additions & 4 deletions tests/integration/buildcmd/build_integ_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,11 +241,23 @@ def _verify_invoke_built_function(self, template_path, function_logical_id, over
overrides,
]

process_execute = run_command(cmdlist)
process_execute.process.wait()
for i in range(5):
process_execute = run_command(cmdlist)
process_stdout = process_execute.stdout.decode("utf-8")
process_stderr = process_execute.stderr.decode("utf-8")
LOG.info("Local invoke stdout: %s", process_stdout)
LOG.info("Local invoke stderr: %s", process_stderr)

if "timed out after" in process_stderr:
LOG.info("Function timed out, retrying")
continue

if json.loads(process_stdout) == expected_result:
LOG.info("Expected result found, succeeded!")
# success
return

process_stdout = process_execute.stdout.decode("utf-8")
self.assertEqual(json.loads(process_stdout), expected_result)
self.fail("Failed to invoke function & get expected result")

def get_override(self, runtime, code_uri, architecture, handler):
overrides = {"Runtime": runtime, "CodeUri": code_uri, "Handler": handler}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Resources:
Handler: !Ref Handler
Runtime: !Ref Runtime
CodeUri: !Ref CodeUri
Timeout: 600
Timeout: 60
Architectures:
- !Ref Architectures

Expand Down

0 comments on commit f566611

Please sign in to comment.