mirror of
				https://github.com/TeaOSLab/EdgeAPI.git
				synced 2025-11-05 00:11:55 +08:00 
			
		
		
		
	
		
			
	
	
		
			17 lines
		
	
	
		
			256 B
		
	
	
	
		
			Go
		
	
	
	
	
	
		
		
			
		
	
	
			17 lines
		
	
	
		
			256 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| 
								 | 
							
								package tasks
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								import (
							 | 
						||
| 
								 | 
							
									"github.com/iwind/TeaGo/dbs"
							 | 
						||
| 
								 | 
							
									"testing"
							 | 
						||
| 
								 | 
							
								)
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								func TestHealthCheckClusterTask_loop(t *testing.T) {
							 | 
						||
| 
								 | 
							
									dbs.NotifyReady()
							 | 
						||
| 
								 | 
							
									task := NewHealthCheckClusterTask(10, nil)
							 | 
						||
| 
								 | 
							
									err := task.loop(10)
							 | 
						||
| 
								 | 
							
									if err != nil {
							 | 
						||
| 
								 | 
							
										t.Fatal(err)
							 | 
						||
| 
								 | 
							
									}
							 | 
						||
| 
								 | 
							
									t.Log("ok")
							 | 
						||
| 
								 | 
							
								}
							 |