Quellcode durchsuchen

bank-account: make last test quicker

Frida Tveit vor 9 Jahren
Ursprung
Commit
b9e3d3d75c

+ 1
- 2
exercises/bank-account/HINTS.md Datei anzeigen

@@ -4,5 +4,4 @@ To pass the last test you might find the
4 4
 
5 5
 Problems arising from running code concurrently are often intermittent because they depend on the order the code is
6 6
 executed. Therefore the last test runs many [threads](https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html) 
7
-several times to increase the chances of catching a bug. This means the last test might take a while to run, 
8
-though it shouldn't take more than a couple of minutes.
7
+several times to increase the chances of catching a bug.

+ 1
- 1
exercises/bank-account/src/test/java/BankAccountTest.java Datei anzeigen

@@ -169,7 +169,7 @@ public class BankAccountTest {
169 169
         bankAccount.open();
170 170
         bankAccount.deposit(1000);
171 171
 
172
-        for (int i = 0; i < 1000; i++) {
172
+        for (int i = 0; i < 10; i++) {
173 173
             adjustBalanceConcurrently();
174 174
         }
175 175
     }