File tree Expand file tree Collapse file tree
DockerizedTesting.RabbitMQ
DockerizedTesting.Tests/ImageProviders Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -52,7 +52,6 @@ public ConnectionFactory SetupConnectionFactory(ConnectionFactory connectionFact
5252 return connectionFactory ;
5353 }
5454
55- private int success = 0 ;
5655 protected override async Task < bool > IsContainerRunning ( int [ ] ports )
5756 {
5857 try
@@ -69,12 +68,10 @@ protected override async Task<bool> IsContainerRunning(int[] ports)
6968
7069 }
7170 }
72- this . success ++ ;
73- return await Task . FromResult ( this . success >= 5 ) ; // Rabbit seems to work then stop?
71+ return await Task . FromResult ( true ) ;
7472 }
7573 catch
7674 {
77- this . success = 0 ;
7875 return await Task . FromResult ( false ) ;
7976 }
8077 }
Original file line number Diff line number Diff line change @@ -15,8 +15,7 @@ public class DockerProjectImageProviderTests
1515 [ Fact ]
1616 public async Task GetImageThrowsWhenProjectCantBeFound ( )
1717 {
18- var file = new FileInfo ( Path . Combine ( Path . GetTempPath ( ) , Guid . NewGuid ( ) + ".fail.tmp" ) ) ;
19- file . Create ( ) . Dispose ( ) ;
18+ var file = new FileInfo ( Path . GetTempFileName ( ) ) ;
2019 file . Delete ( ) ;
2120 var imageSource = new DockerProjectImageProvider ( file ) ;
2221 await Assert . ThrowsAsync < FileNotFoundException > ( async ( ) => await imageSource . GetImage ( null ) ) ;
@@ -32,9 +31,7 @@ public async Task GetImageThrowsWhenProjectIsNull()
3231 [ Fact ]
3332 public async Task GetImageThrowsWhenProjectFailsToBuild ( )
3433 {
35- var file = new FileInfo ( Path . Combine ( Path . GetTempPath ( ) , Guid . NewGuid ( ) + ".fail.tmp" ) ) ;
36- file . Create ( ) . Dispose ( ) ;
37- //var file = new FileInfo(Path.GetTempFileName());
34+ var file = new FileInfo ( Path . GetTempFileName ( ) ) ;
3835 try
3936 {
4037 var imageSource = new DockerProjectImageProvider ( file ) ;
You can’t perform that action at this time.
0 commit comments