Skip to content

Commit

Permalink
Add longer wait before startup on integration tests. Get logging to w…
Browse files Browse the repository at this point in the history
…ork.
  • Loading branch information
Azrenbeth authored and Azrenbeth committed Sep 16, 2021
1 parent 55ef37a commit 815db5c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ _trial_temp.lock
/sydent.db
/sydent.pid
/matrix_is_test/sydent.stderr
/matrix_is_test/sydent.log
6 changes: 2 additions & 4 deletions matrix_is_test/launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
terms.path = {terms_path}
templates.path = {testsubject_path}/res
brand.default = is-test
log.path = {testsubject_path}/sydent.log
ip.whitelist = 127.0.0.1
Expand Down Expand Up @@ -89,18 +90,15 @@ def launch(self):
}
)

stderr_fp = open(os.path.join(testsubject_path, "sydent.stderr"), "w")

pybin = os.getenv("SYDENT_PYTHON", "python")

self.process = Popen(
args=[pybin, "-m", "sydent.sydent"],
cwd=self.tmpdir,
env=newEnv,
stderr=stderr_fp,
)
# XXX: wait for startup in a sensible way
time.sleep(2)
time.sleep(10)

self._baseUrl = "http://localhost:%d" % (port,)

Expand Down
2 changes: 2 additions & 0 deletions sydent/http/servlets/registerservlet.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,11 @@ async def render_POST(self, request: Request) -> JsonDict:
"""
Register with the Identity Server
"""

send_cors(request)

args = get_args(request, ("matrix_server_name", "access_token"))
logger.info(args)

matrix_server = args["matrix_server_name"].lower()

Expand Down

0 comments on commit 815db5c

Please sign in to comment.