Merge branch 'Release_2_8_2_Branch' into
[jalview.git] / test / jalview / ws / jabaws / MinJabawsClientTests.java
index a938dd6..0c25cdb 100644 (file)
@@ -5,7 +5,6 @@ import static org.junit.Assert.fail;
 
 import java.util.ArrayList;
 import java.util.List;
-import java.util.function.Consumer;
 
 import org.junit.Test;
 
@@ -51,32 +50,40 @@ public class MinJabawsClientTests {
                        }
 
                        String jobid = msaservice.align(iseqs);
-                       if (jobid != null) {
-                               JobStatus js = null;
-                               do {
-                                       try {
-                                               Thread.sleep(500);
-                                       } catch (InterruptedException q) {
-                                       }
-                                       ;
-                                       js = msaservice.getJobStatus(jobid);
-                               } while (!js.equals(JobStatus.FAILED)
-                                               && !js.equals(JobStatus.CANCELLED)
-                                               && !js.equals(JobStatus.FINISHED));
-                               assertEquals("Trial alignment failed. State was " + js.name(),
-                                               js, JobStatus.FINISHED);
-                               assertEquals(
-                                               "Mismatch in number of input and result sequences - assume alignment service wasn't interacted with correctly",
-                                               msaservice.getResult(jobid).getSequences().size(),
-                                               iseqs.size());
-                               msaservice.getResult(jobid).getSequences()
-                                               .forEach(new Consumer<FastaSequence>() {
-                                                       @Override
-                                                       public void accept(FastaSequence t) {
-                                                               System.out.println(">"+t.getId());
-                                                               System.out.println(t.getFormattedFasta());
-                                                       }
-                                               });
+      if (jobid != null)
+      {
+        JobStatus js = null;
+        do
+        {
+          try
+          {
+            Thread.sleep(500);
+          } catch (InterruptedException q)
+          {
+          }
+          ;
+          js = msaservice.getJobStatus(jobid);
+        } while (!js.equals(JobStatus.FAILED)
+                && !js.equals(JobStatus.CANCELLED)
+                && !js.equals(JobStatus.FINISHED));
+        assertEquals("Trial alignment failed. State was " + js.name(), js,
+                JobStatus.FINISHED);
+        assertEquals(
+                "Mismatch in number of input and result sequences - assume alignment service wasn't interacted with correctly",
+                msaservice.getResult(jobid).getSequences().size(),
+                iseqs.size());
+        for (FastaSequence t : msaservice.getResult(jobid).getSequences())
+        {
+          System.out.println(">" + t.getId());
+          System.out.println(t.getFormattedFasta());
+        }
+        // .forEach(new Consumer<FastaSequence>() {
+        // @Override
+        // public void accept(FastaSequence t) {
+        // System.out.println(">"+t.getId());
+        // System.out.println(t.getFormattedFasta());
+        // }
+        // });
                        }
 
                }