removed transactional annotation
This commit is contained in:
		
							parent
							
								
									bc446e25d4
								
							
						
					
					
						commit
						91c73a097e
					
				@ -12,10 +12,7 @@ import org.junit.jupiter.api.BeforeEach;
 | 
				
			|||||||
import org.junit.jupiter.api.Test;
 | 
					import org.junit.jupiter.api.Test;
 | 
				
			||||||
import org.springframework.beans.factory.annotation.Autowired;
 | 
					import org.springframework.beans.factory.annotation.Autowired;
 | 
				
			||||||
import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest;
 | 
					import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest;
 | 
				
			||||||
import org.springframework.transaction.annotation.Transactional;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
import com.baeldung.spring.data.jpa.collectionsvsstream.User;
 | 
					 | 
				
			||||||
import com.baeldung.spring.data.jpa.collectionsvsstream.UserRepository;
 | 
					 | 
				
			||||||
import com.github.javafaker.Faker;
 | 
					import com.github.javafaker.Faker;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@DataJpaTest
 | 
					@DataJpaTest
 | 
				
			||||||
@ -52,7 +49,6 @@ class UserRepositoryIntegrationTest {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Test
 | 
					    @Test
 | 
				
			||||||
    @Transactional
 | 
					 | 
				
			||||||
    public void whenAgeIs20_thenItShouldReturnAllUsersWhoseAgeIsGreaterThan20InAStream() {
 | 
					    public void whenAgeIs20_thenItShouldReturnAllUsersWhoseAgeIsGreaterThan20InAStream() {
 | 
				
			||||||
        Stream<User> users = userRepository.findAllByAgeGreaterThan(20);
 | 
					        Stream<User> users = userRepository.findAllByAgeGreaterThan(20);
 | 
				
			||||||
        assertThat(users).isNotNull();
 | 
					        assertThat(users).isNotNull();
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user