File tree Expand file tree Collapse file tree 3 files changed +29
-0
lines changed Expand file tree Collapse file tree 3 files changed +29
-0
lines changed Original file line number Diff line number Diff line change 1+ from __future__ import absolute_import
12import os
3+ import time
4+ import threading
25import opentracing
36import instana .tracer
7+ from .apps .flaskalino import app as flaskalino
48os .environ ["INSTANA_TEST" ] = "true"
59
610opentracing .global_tracer = instana .tracer .InstanaTracer ()
11+
12+ # Spawn our background Flask app that the tests will throw
13+ # requests at. Don't continue until the test app is fully
14+ # up and running.
15+ timer = threading .Thread (target = flaskalino .run )
16+ timer .daemon = True
17+ timer .name = "Test Flask app"
18+ print ("Starting background test app" )
19+ timer .start ()
20+ time .sleep (1 )
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env python
2+ # -*- coding: utf-8 -*-
3+ from flask import Flask
4+ app = Flask (__name__ )
5+ app .debug = False
6+ app .use_reloader = False
7+
8+
9+ @app .route ("/" )
10+ def hello ():
11+ return "<center><h1>🐍 Hello Stan! 🦄</h1></center>"
12+
13+
14+ if __name__ == '__main__' :
15+ app .run ()
You can’t perform that action at this time.
0 commit comments