You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by rm...@apache.org on 2016/04/29 18:53:27 UTC
tomee git commit: fixing test after flush JMX addition
Repository: tomee
Updated Branches:
refs/heads/master 3b598761a -> a3aa977b4
fixing test after flush JMX addition
Project: http://git-wip-us.apache.org/repos/asf/tomee/repo
Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/a3aa977b
Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/a3aa977b
Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/a3aa977b
Branch: refs/heads/master
Commit: a3aa977b42d82eb3e3bd200850c4201d57dbe9ba
Parents: 3b59876
Author: Romain manni-Bucau <rm...@gmail.com>
Authored: Fri Apr 29 18:53:13 2016 +0200
Committer: Romain manni-Bucau <rm...@gmail.com>
Committed: Fri Apr 29 18:53:13 2016 +0200
----------------------------------------------------------------------
.../core/stateless/StatelessPoolStatsTest.java | 1 +
.../org/superbiz/eclipselink/MoviesTest.java | 54 ++++++++++++++++++++
2 files changed, 55 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tomee/blob/a3aa977b/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/StatelessPoolStatsTest.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/StatelessPoolStatsTest.java b/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/StatelessPoolStatsTest.java
index 70539b2..3e25f43 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/StatelessPoolStatsTest.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/StatelessPoolStatsTest.java
@@ -197,6 +197,7 @@ public class StatelessPoolStatsTest extends TestCase {
"FilterAttributes",
"Filters the attributes that show up in the MBeanInfo. The exclude is applied first, then any attributes that match the include are re-added. It may be required to disconnect and reconnect the JMX console to force a refresh of the MBeanInfo",
operations, "void", MBeanOperationInfo.UNKNOWN));
+ expectedOperations.add(new MBeanOperationInfo("flush", "", new MBeanParameterInfo[0], "void", MBeanOperationInfo.UNKNOWN));
final List<MBeanOperationInfo> actualOperations = new ArrayList<MBeanOperationInfo>();
actualOperations.addAll(Arrays.asList(poolMBeanInfo.getOperations()));
http://git-wip-us.apache.org/repos/asf/tomee/blob/a3aa977b/examples/jpa-eclipselink/srcstest/java/org/superbiz/eclipselink/MoviesTest.java
----------------------------------------------------------------------
diff --git a/examples/jpa-eclipselink/srcstest/java/org/superbiz/eclipselink/MoviesTest.java b/examples/jpa-eclipselink/srcstest/java/org/superbiz/eclipselink/MoviesTest.java
new file mode 100644
index 0000000..f661b2d
--- /dev/null
+++ b/examples/jpa-eclipselink/srcstest/java/org/superbiz/eclipselink/MoviesTest.java
@@ -0,0 +1,54 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.superbiz.eclipselink;
+
+import junit.framework.TestCase;
+
+import javax.ejb.embeddable.EJBContainer;
+import javax.naming.Context;
+import java.util.List;
+import java.util.Properties;
+
+/**
+ * @version $Revision: 607077 $ $Date: 2007-12-27 06:55:23 -0800 (Thu, 27 Dec 2007) $
+ */
+public class MoviesTest extends TestCase {
+
+ public void test() throws Exception {
+ Properties p = new Properties();
+ p.put("movieDatabase", "new://Resource?type=DataSource");
+ p.put("movieDatabase.JdbcDriver", "org.hsqldb.jdbcDriver");
+ p.put("movieDatabase.JdbcUrl", "jdbc:hsqldb:mem:moviedb");
+
+ final Context context = EJBContainer.createEJBContainer(p).getContext();
+
+ Movies movies = (Movies) context.lookup("java:global/jpa-eclipselink/Movies");
+
+ movies.addMovie(new Movie("Quentin Tarantino", "Reservoir Dogs", 1992));
+ movies.addMovie(new Movie("Joel Coen", "Fargo", 1996));
+ movies.addMovie(new Movie("Joel Coen", "The Big Lebowski", 1998));
+
+ List<Movie> list = movies.getMovies();
+ assertEquals("List.size()", 3, list.size());
+
+ for (Movie movie : list) {
+ movies.deleteMovie(movie);
+ }
+
+ assertEquals("Movies.getMovies()", 0, movies.getMovies().size());
+ }
+}