File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change 1414      PYTHON : ${{ matrix.python-version }} 
1515    steps :
1616      - uses : actions/checkout@v2 
17-       - 
uses : 
docker-practice/[email protected]  1817      - name : Setup Python 
1918        id : setup-python 
2019        uses : actions/setup-python@v2 
Original file line number Diff line number Diff line change @@ -173,17 +173,18 @@ class TrinoContainerSingleton:
173173    catalog_dir  =  current_file .parent .joinpath (
174174        "integration/feature_repos/universal/data_sources/catalog" 
175175    )
176- 
177-     container  =  (
178-         DockerContainer ("trinodb/trino:376" )
179-         .with_volume_mapping (catalog_dir , "/etc/catalog/" )
180-         .with_exposed_ports ("8080" )
181-     )
176+     container  =  None 
182177    is_running  =  False 
183178
184179    @classmethod  
185180    def  get_singleton (cls ):
186181        if  not  cls .is_running :
182+             cls .container  =  (
183+                 DockerContainer ("trinodb/trino:376" )
184+                 .with_volume_mapping (cls .catalog_dir , "/etc/catalog/" )
185+                 .with_exposed_ports ("8080" )
186+             )
187+ 
187188            cls .container .start ()
188189            log_string_to_wait_for  =  "SERVER STARTED" 
189190            wait_for_logs (
@@ -194,7 +195,8 @@ def get_singleton(cls):
194195
195196    @classmethod  
196197    def  teardown (cls ):
197-         cls .container .stop ()
198+         if  cls .container :
199+             cls .container .stop ()
198200
199201
200202@pytest .fixture ( 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments