ko-felix-test/src/test/java/org/netbeans/html/ko/felix/test/KnockoutFelixIT.java
changeset 1021 c918924ad3c5
parent 1018 82ec9872793a
     1.1 --- a/ko-felix-test/src/test/java/org/netbeans/html/ko/felix/test/KnockoutFelixIT.java	Thu Nov 05 23:53:34 2015 +0100
     1.2 +++ b/ko-felix-test/src/test/java/org/netbeans/html/ko/felix/test/KnockoutFelixIT.java	Thu Nov 26 20:59:51 2015 +0100
     1.3 @@ -42,7 +42,6 @@
     1.4   */
     1.5  package org.netbeans.html.ko.felix.test;
     1.6  
     1.7 -import org.netbeans.html.ko.felix.test.KnockoutFelixTCKImpl;
     1.8  import java.io.Closeable;
     1.9  import java.io.File;
    1.10  import java.io.IOException;
    1.11 @@ -172,6 +171,9 @@
    1.12                  if (name.contains("testng")) {
    1.13                      continue;
    1.14                  }
    1.15 +                if (name.equals("org.apache.aries.spifly.dynamic.bundle")) {
    1.16 +                    continue;
    1.17 +                }
    1.18                  final String path = "reference:" + file.toURI().toString();
    1.19                  try {
    1.20                      Bundle b = f.getBundleContext().installBundle(path);
    1.21 @@ -204,10 +206,10 @@
    1.22          
    1.23          URI uri = DynamicHTTP.initServer();
    1.24  
    1.25 -        Method start = peer.getMethod("start", URI.class);
    1.26 -        start.invoke(null, uri);
    1.27 +        Method start = peer.getMethod("start", String.class, URI.class, boolean.class);
    1.28 +        start.invoke(null, KnockoutFelixIT.class.getName(), uri, true);
    1.29          
    1.30 -        ClassLoader l = getClassLoader();
    1.31 +        ClassLoader l = getClassLoader(null);
    1.32          List<Object> res = new ArrayList<Object>();
    1.33          for (int i = 0; i < arr.length; i++) {
    1.34              seekKOTests(arr[i], res);
    1.35 @@ -221,15 +223,18 @@
    1.36              asSubclass(Annotation.class);
    1.37          for (Method m : c.getMethods()) {
    1.38              if (m.getAnnotation(koTest) != null) {
    1.39 -                res.add(new KOFx(browserContext, m));
    1.40 +                res.add(new KOFx(KnockoutFelixIT.class, browserContext, m));
    1.41              }
    1.42          }
    1.43      }
    1.44  
    1.45 -    static synchronized ClassLoader getClassLoader() throws InterruptedException {
    1.46 +    static synchronized ClassLoader getClassLoader(Object[] presenter) throws InterruptedException {
    1.47          while (browserClass == null) {
    1.48              KnockoutFelixIT.class.wait();
    1.49          }
    1.50 +        if (presenter != null) {
    1.51 +            presenter[0] = browserContext;
    1.52 +        }
    1.53          return browserClass.getClassLoader();
    1.54      }
    1.55      
    1.56 @@ -239,7 +244,7 @@
    1.57          KnockoutFelixIT.class.notifyAll();
    1.58      }
    1.59  
    1.60 -    static Closeable activateInOSGi(Object presenter) throws Exception {
    1.61 +    public static Closeable activateInOSGi(Object presenter) throws Exception {
    1.62          Class<?> presenterClass = loadOSGiClass(Fn.Presenter.class);
    1.63          Class<?> fnClass = loadOSGiClass(Fn.class);
    1.64          Method m = fnClass.getMethod("activate", presenterClass);