* PoC: memory registry using maps instead of slice madness * Updated proto and handlers. Fixed tests across codebase. * Implemented ttl pruning for memory registry * Added extensive memory registry tests * Squased a bunch of bugs * Proto indent; memory.Registry.String() returns "memory" * Write a test to prove memory registry TTLs are busted Signed-off-by: Erik Hollensbe <github@hollensbe.org> * Additional memory testing and fixups: * DefaultTTL removed * When TTL == 0, it is automatically removed from expiry conditions * Additional improvements to new tests Signed-off-by: Erik Hollensbe <github@hollensbe.org>
This commit is contained in:
		
				
					committed by
					
						 Asim Aslam
						Asim Aslam
					
				
			
			
				
	
			
			
			
						parent
						
							97c1300f53
						
					
				
				
					commit
					4107733453
				
			| @@ -9,9 +9,7 @@ import ( | ||||
| func TestRegistrySelector(t *testing.T) { | ||||
| 	counts := map[string]int{} | ||||
|  | ||||
| 	r := memory.NewRegistry() | ||||
| 	rg := r.(*memory.Registry) | ||||
| 	rg.Services = testData | ||||
| 	r := memory.NewRegistry(memory.Services(testData)) | ||||
| 	cache := NewSelector(Registry(r)) | ||||
|  | ||||
| 	next, err := cache.Select("foo") | ||||
|   | ||||
		Reference in New Issue
	
	Block a user