mirror of
				https://github.com/open-metadata/OpenMetadata.git
				synced 2025-11-04 04:29:13 +00:00 
			
		
		
		
	ISSUE-1740: Added random number generation for values between 5-20 for list+pagination testing (#1782)
* ISSUE-1740: Added random number generation for values between 5-40 inclusive for maxEntities variable in get_entityListWithPagination_200 method * ISSUE-1740: Added random number generation for values between 5-20 inclusive for maxEntities variable in get_entityListWithPagination_200 method * ISSUE-1740: Added random number generation for values between 5-20 inclusive for maxEntities variable in get_entityListWithPagination_200 method
This commit is contained in:
		
							parent
							
								
									5627c92d7b
								
							
						
					
					
						commit
						7812f87f31
					
				@ -73,6 +73,7 @@ import java.util.Map.Entry;
 | 
				
			|||||||
import java.util.Optional;
 | 
					import java.util.Optional;
 | 
				
			||||||
import java.util.UUID;
 | 
					import java.util.UUID;
 | 
				
			||||||
import java.util.function.BiConsumer;
 | 
					import java.util.function.BiConsumer;
 | 
				
			||||||
 | 
					import java.util.Random;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import static javax.ws.rs.core.Response.Status.BAD_REQUEST;
 | 
					import static javax.ws.rs.core.Response.Status.BAD_REQUEST;
 | 
				
			||||||
import static javax.ws.rs.core.Response.Status.CONFLICT;
 | 
					import static javax.ws.rs.core.Response.Status.CONFLICT;
 | 
				
			||||||
@ -250,8 +251,10 @@ public abstract class EntityResourceTest<T> extends CatalogApplicationTest {
 | 
				
			|||||||
  ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 | 
					  ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 | 
				
			||||||
  @Test
 | 
					  @Test
 | 
				
			||||||
  public void get_entityListWithPagination_200(TestInfo test) throws HttpResponseException, URISyntaxException {
 | 
					  public void get_entityListWithPagination_200(TestInfo test) throws HttpResponseException, URISyntaxException {
 | 
				
			||||||
    // Create a large number of tables
 | 
					    // Create a number of tables between 5 and 20 inclusive
 | 
				
			||||||
    int maxEntities = 40;
 | 
					    Random rand = new Random();
 | 
				
			||||||
 | 
					    int maxEntities = rand.nextInt(16) + 5;
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
    for (int i = 0; i < maxEntities; i++) {
 | 
					    for (int i = 0; i < maxEntities; i++) {
 | 
				
			||||||
      createEntity(createRequest(getEntityName(test, i), null, null, null), adminAuthHeaders());
 | 
					      createEntity(createRequest(getEntityName(test, i), null, null, null), adminAuthHeaders());
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user