Skip to content

Commit

Permalink
Tests for JBAS-8107
Browse files Browse the repository at this point in the history
  • Loading branch information
pmuir committed Jun 16, 2010
1 parent e1ddce9 commit deb29fe
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
32 changes: 32 additions & 0 deletions tests/src/test/java/org/jboss/weld/tests/ejb/singleton/Foo.java
@@ -0,0 +1,32 @@
package org.jboss.weld.tests.ejb.singleton;

import javax.annotation.PostConstruct;
import javax.ejb.Singleton;
import javax.ejb.Startup;
import javax.enterprise.context.ApplicationScoped;

@Singleton
@Startup
@ApplicationScoped
public class Foo
{

private static boolean postConstructCalled;

public static boolean isPostConstructCalled()
{
return postConstructCalled;
}

public static void reset()
{
postConstructCalled = false;
}

@PostConstruct
public void postConstruct()
{
postConstructCalled = true;
}

}
@@ -0,0 +1,22 @@
package org.jboss.weld.tests.ejb.singleton;

import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.testharness.impl.packaging.IntegrationTest;
import org.jboss.testharness.impl.packaging.Packaging;
import org.jboss.testharness.impl.packaging.PackagingType;
import org.jboss.weld.test.AbstractWeldTest;
import org.testng.annotations.Test;

@Artifact
@IntegrationTest
@Packaging(PackagingType.EAR)
public class SingletonStartupTest extends AbstractWeldTest
{

@Test(enabled=false) // JBAS-8107
public void testSingletonStartup()
{
assert Foo.isPostConstructCalled();
}

}

0 comments on commit deb29fe

Please sign in to comment.