Search Results

Search found 24915 results on 997 pages for 'ordered test'.

Page 34/997 | < Previous Page | 30 31 32 33 34 35 36 37 38 39 40 41  | Next Page >

  • using pom for test scope dependencies

    - by IttayD
    Hi, Is it possible to create a pom file so it can be used inside another pom to add test scope dependencies? So in module E's pom.xml I have: <dependencies> <dependency> <groupId>com.example</artifactId> <artifactId>D</artifactId> <type>pom</type> <scope>test</scope> </dependency> </dependencies> So that if D's pom.xml contains dependencies on artifacts A, B, C, then these artifacts are in the compilation and execution classpath of E's tests. NOTE: the reason I want such a pom, and not rely on regular dependency resolution is that I have created a tests jar using maven-jar-plugin:test-jar and using that jar as a dependency causes maven to not use its transitive dependencies. (see http://jira.codehaus.org/browse/MNG-1378) UPDATE: this does not work for me (maybe because I'm trying to use it for the test scope): http://www.sonatype.com/books/mvnref-book/reference/pom-relationships-sect-pom-best-practice.html

    Read the article

  • P values in wilcox.test gone mad :(

    - by Error404
    I have a code that isn't doing what it should do. I am testing P value for a wilcox.test for a huge set of data. the code i am using is the following library(MASS) data1 <- read.csv("file1path.csv",header=T,sep=",") data2 <- read.csv("file2path.csv",header=T,sep=",") data3 <- read.csv("file3path.csv",header=T,sep=",") data4 <- read.csv("file4path.csv",header=T,sep=",") data1$K <- with(data1,{"N"}) data2$K <- with(data2,{"E"}) data3$K <- with(data3,{"M"}) data4$K <- with(data4,{"U"}) new=rbind(data1,data2,data3,data4) i=3 for (o in 1:4800){ x1 <- data1[,i] x2 <- data2[,i] x3 <- data3[,i] x4 <- data4[,i] wt12 <- wilcox.test(x1,x2, na.omit=TRUE) wt13 <- wilcox.test(x1,x3, na.omit=TRUE) wt14 <- wilcox.test(x1,x4, na.omit=TRUE) if (wt12$p.value=="NaN"){ print("This is wrong") } else if (wt12$p.value < 0.05){ print(wt12$p.value) mypath=file.path("C:", "all1-less-05", (paste("graph-data1-data2",names(data1[i]), ".pdf", sep="-"))) pdf(file=mypath) mytitle = paste("graph",names(data1[i])) boxplot(new[,i] ~ new$K, main = mytitle, names.arg=c("data1","data2","data3","data4")) dev.off() } if (wt13$p.value=="NaN"){ print("This is wrong") } else if (wt13$p.value < 0.05){ print(wt13$p.value) mypath=file.path("C:", "all2-less-05", (paste("graph-data1-data3",names(data1[i]), ".pdf", sep="-"))) pdf(file=mypath) mytitle = paste("graph",names(data1[i])) boxplot(new[,i] ~ new$K, main = mytitle, names.arg=c("data1","data2","data3","data4")) dev.off() } if (wt14$p.value=="NaN"){ print("This is wrong") } else if (wt14$p.value < 0.05){ print(wt14$p.value) mypath=file.path("C:", "all3-less-05", (paste("graph-data1-data4",names(data1[i]), ".pdf", sep="-"))) pdf(file=mypath) mytitle = paste("graph",names(data1[i])) boxplot(new[,i] ~ new$K, main = mytitle, names.arg=c("data1","data2","data3","data4")) dev.off() } i=i+1 } I am having 2 problems with this long command: 1- Without specifying a certain P value, the code gives me arouind 14,000 graphs, when specifying a p value less than 0.05 the number of graphs generated goes down to 9,0000. THE FIRST PROBLEM IS: Some P value are more than 0.05 and are still showing up! 2- I designed the program to give me a result of "This is wrong" when the Value of P is "NaN", I am getting results of "NaN" Here's a screenshot from the results do you know what the mistake i made with the command to get these errors? Thanks in advance

    Read the article

  • JUnit Test method with randomized nature

    - by Peter
    Hey, I'm working on a small project for myself at the moment and I'm using it as an opportunity to get acquainted with unit testing and maintaining proper documentation. I have a Deck class with represents a deck of cards (it's very simple and, to be honest, I can be sure that it works without a unit test, but like I said I'm getting used to using unit tests) and it has a shuffle() method which changes the order of the cards in the deck. The implementation is very simple and will certainly work: public void shuffle() { Collections.shuffle(this.cards); } But, how could I implement a unit test for this method. My first thought was to check if the top card of the deck was different after calling shuffle() but there is of course the possibility that it would be the same. My second thought was to check if the entire order of cards has changed, but again they could possibly be in the same order. So, how could I write a test that ensures this method works in all cases? And, in general, how can you unit test methods for which the outcome depends on some randomness? Cheers, Pete

    Read the article

  • How to test method call order with Moq

    - by Finglas
    At the moment I have: [Test] public void DrawDrawsAllScreensInTheReverseOrderOfTheStack() { // Arrange. var screenMockOne = new Mock<IScreen>(); var screenMockTwo = new Mock<IScreen>(); var screens = new List<IScreen>(); screens.Add(screenMockOne.Object); screens.Add(screenMockTwo.Object); var stackOfScreensMock = new Mock<IScreenStack>(); stackOfScreensMock.Setup(s => s.ToArray()).Returns(screens.ToArray()); var screenManager = new ScreenManager(stackOfScreensMock.Object); // Act. screenManager.Draw(new Mock<GameTime>().Object); // Assert. screenMockOne.Verify(smo => smo.Draw(It.IsAny<GameTime>()), Times.Once(), "Draw was not called on screen mock one"); screenMockTwo.Verify(smo => smo.Draw(It.IsAny<GameTime>()), Times.Once(), "Draw was not called on screen mock two"); } But the order in which I draw my objects in the production code does not matter. I could do one first, or two it doesn't matter. However it should matter as the draw order is important. How do you (using Moq) ensure methods are called in a certain order? Edit I got rid of that test. The draw method has been removed from my unit tests. I'll just have to manually test it works. The reversing of the order though was taken into a seperate test class where it was tested so it's not all bad. Thanks for the link about the feature they are looking into. I sure hope it gets added soon, very handy.

    Read the article

  • Visual Studio Unit Test failure to start

    - by swmi
    Hi, I am having an issue when starting the tests under debug mode in Visual Studio 2008 Team Test where it gives the following error: "Failed to queue test run '{user@machinename}': Object reference not set to an instance of an object." I googled for the error but no joy. Don't even understand what it means as it is too brief. Has anyone come across this? Note that I can run tests fine if I am not debugging and I get the same error irrespective of the test I run. Thank you, Swati ETA: Being new to Visual Studio Team Test, I didn't know there was a better exception log then what I was seeing. Anyhow, here it is: <Exception> System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.VisualStudio.TestTools.TestCaseManagement.QualityToolsPackage. ShowToolWindow [T](T&amp; toolWindow, String errorMessage, Boolean show) at Microsoft.VisualStudio.TestTools.TestCaseManagement.QualityToolsPackage. OpenTestResultsToolWindow() at Microsoft.VisualStudio.TestTools.TestCaseManagement.SolutionIntegrationManager. DebugTarget(DebugInfo debugInfo, Boolean prepareEnvironment) at Microsoft.VisualStudio.TestTools.TestManagement.DebugProcessLauncher.Launch( String exeFileName, String args, String workingDir, EventHandler processExitedHandler, Process&amp; process) at Microsoft.VisualStudio.TestTools.TestManagement.LocalControllerProxy.StartProcess( TestRun run) at Microsoft.VisualStudio.TestTools.TestManagement.LocalControllerProxy.RestartProcess( TestRun run) at Microsoft.VisualStudio.TestTools.TestManagement.LocalControllerProxy.PrepareProcess( TestRun run) at Microsoft.VisualStudio.TestTools.TestManagement.LocalControllerProxy. InitializeController(TestRun run) at Microsoft.VisualStudio.TestTools.TestManagement.ControllerProxy.QueueTestRunWorker( Object state) </Exception>

    Read the article

  • G++ Compiling errors

    - by egn56
    Attempting to do some compiling with g++ and when I run g++ test.cpp this is what I get. I am in the correct directory and I have even messed with the permission settings to make those directories chmod 777 as a test, still nothing. Tried running it as sudo g++ test.cpp and getting nothing. It can compile and create a .o if i run g++ -c test.cpp but it can't seem to link it and create the .out. Any suggestions? /usr/bin/ld: 1: /usr/bin/ld: /bin: Permission denied /usr/bin/ld: 2: /usr/bin/ld: test.cpp: not found /usr/bin/ld: 3: /usr/bin/ld: test.cpp: not found /usr/bin/ld: 4: /usr/bin/ld: test.cpp: not found /usr/bin/ld: 5: /usr/bin/ld: test.cpp: not found /usr/bin/ld: 6: /usr/bin/ld: test.cpp: not found /usr/bin/ld: 7: /usr/bin/ld: test.cpp: not found /usr/bin/ld: 8: /usr/bin/ld: test.cpp: not found /usr/bin/ld: 9: /usr/bin/ld: test.cpp: not found /usr/bin/ld: 10: /usr/bin/ld: test.cpp: not found /usr/bin/ld: 11: /usr/bin/ld: test.cpp: not found /usr/bin/ld: 12: /usr/bin/ld: Syntax error: "(" unexpected collect2: ld returned 2 exit status

    Read the article

  • Maven Cobertura: unit test failed but build success

    - by Pavel Drobushevich
    Hi all, I've configured cobertura code coverage in my pom: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>cobertura-maven-plugin</artifactId> <version>2.4</version> <configuration> <instrumentation> <excludes> <exclude>**/*Exception.class</exclude> </excludes> </instrumentation> <formats> <format>xml</format> <format>html</format> </formats> </configuration> </plugin> And start test by following command: mvn clean cobertura:cobertura But if one of unit test fail Cobertura only log this information and doesn't mark build fail. Tests run: 287, Failures: 1, Errors: 1, Skipped: 0 Flushing results... Flushing results done Cobertura: Loaded information on 139 classes. Cobertura: Saved information on 139 classes. [ERROR] There are test failures. ................................. [INFO] BUILD SUCCESS How to configure Cobertura marks build failed in one of unit test fail? Thanks in advance.

    Read the article

  • Where can I find project repositories with continuous testing?

    - by Jenny Smith
    I am interested in studying some test logs from different projects, in order to build and test an application for school. I need to analyze the parts of the code which are tested, the bugs which appeared in those parts and eventually how they were resolved. But for this I need some repositories from different (open source) projects. Can someone please help me with ideas or links or any kind of test logs which might be useful? I really need some resources, so any help is appreciated.

    Read the article

  • How do I write an RSpec test to unit-test this interesting metaprogramming code?

    - by Kyle Kaitan
    Here's some simple code that, for each argument specified, will add specific get/set methods named after that argument. If you write attr_option :foo, :bar, then you will see #foo/foo= and #bar/bar= instance methods on Config: module Configurator class Config def initialize() @options = {} end def self.attr_option(*args) args.each do |a| if not self.method_defined?(a) define_method "#{a}" do @options[:"#{a}"] ||= {} end define_method "#{a}=" do |v| @options[:"#{a}"] = v end else throw Exception.new("already have attr_option for #{a}") end end end end end So far, so good. I want to write some RSpec tests to verify this code is actually doing what it's supposed to. But there's a problem! If I invoke attr_option :foo in one of the test methods, that method is now forever defined in Config. So a subsequent test will fail when it shouldn't, because foo is already defined: it "should support a specified option" do c = Configurator::Config c.attr_option :foo # ... end it "should support multiple options" do c = Configurator::Config c.attr_option :foo, :bar, :baz # Error! :foo already defined # by a previous test. # ... end Is there a way I can give each test an anonymous "clone" of the Config class which is independent of the others?

    Read the article

  • Rails Functional Test Failing Due to Association

    - by Koby
    I have an accounts model that holds some basic account info (account name, website, etc). I then have a user model that has the following in the app/models/user.rb belongs_to :account I also have the following in my routes.rb map.resources :account, :has_many => [:users, :othermodel] the problem I'm facing is that the following test is failing: test "should create user" do assert_difference('User.count') do post :create, :user => { } #this is the line it's actually failing on end assert_redirected_to user_path(assigns(:user)) #it doesn't get here yet end The error it gives is "Can't find Account without ID" so I kind of understand WHY it's failing, because of the fact that it doesn't have the account object (or account_id as it were) to know under what account to create the user. I have tried variations of the following but I am completely lost: post :create, :user => { accounts(:one) } #I have the 'fixtures :accounts' syntax at the top of the test class post :create, [accounts(:one), :user] => { } post :create, :user => { accounts(:one), #other params for :user } and like I said, just about every variation I could think of. I can't find much documentation on doing this and this might be why people have moved to Factories for doing test data, but I want to understand things that come standard in Rails before moving onto other things. Can anyone help me get this working?

    Read the article

  • (C++) What's the difference between these overloaded operator functions?

    - by cv3000
    What is the difference between these two ways of overloading the != operator below. Which is consider better? Class Test { ...// private: int iTest public: BOOL operator==(const &Test test) const; BOOL operator!=(const &Test test) const; } BOOL operator==(const &Test test) const { return (iTest == test.iTest); } //overload function 1 BOOL Test::operator!=(const &Test test) const { return !operator==(test); } //overload function 2 BOOL Test::operator!=(const &Test test) const { return (iTest != test.iTest); } I've just recently seen function 1's syntax for calling a sibling operator function and wonder if writing it that way provides any benefits.

    Read the article

  • Yeoman 'grunt test' fails on clean project with 'port already in use'

    - by XMLilley
    With: Mac OS 10.8.4 Node 0.10.12 npm 1.3.1 grunt-cli 0.1.9 yo 1.0.0-rc.1 bower 0.9.2 [email protected] I encounter the following error with a clean yo angular project, followed by grunt server then grunt test: Running "connect:test" (connect) task Fatal error: Port 9000 is already in use by another process. I'm new to Yeoman and am stumped. I've deleted my original project and created a new one in a fresh folder just to make sure I wasn't overlooking any invisible configs. I restarted the machine to make sure I wasn't running any temporary server processes I had forgotten about. After all attempts, the basic server starts fine, attaches to Chrome, and the watcher updates the browser on any changes. (Notably, the server is running on 9000, which seems odd for the test-runner to also be trying to use 9000.) But I get that same error on attempting to start the test runner. Is this something I can fix, or an issue I should report to the Yeoman team? Thanks.

    Read the article

  • Need Insight - What is the best practice for syncing up a production database that will be used on a

    - by james
    I have a site set up using CakePHP and MySQL and I want to work on a test database without disrupting my live site in case something goes wrong. I have another busy site, but my test site runs off the live database which can be occasionally nerve wracking. What do I do if I change a table name in the test db and I want it changed in the live database? Or if I remove a record from the test database. Is there a way to diff the changes? How do I even merge those changes? How does this interfere with live user edits and things of that nature? Hopefully some of you working devs can share some insight!

    Read the article

  • Running unittest with typical test directory structure.

    - by Major Major
    The very common directory structure for even a simple Python module seems to be to separate the unit tests into their own test directory: new_project/ antigravity/ antigravity.py test/ test_antigravity.py setup.py etc. for example see this Python project howto. My question is simply What's the usual way of actually running the tests? I suspect this is obvious to everyone except me, but you can't just run python test_antigravity.py from the test directory as its import antigravity will fail as the module is not on the path. I know I could modify PYTHONPATH and other search path related tricks, but I can't believe that's the simplest way - it's fine if you're the developer but not realistic to expect your users to use if they just want to check the tests are passing. The other alternative is just to copy the test file into the other directory, but it seems a bit dumb and misses the point of having them in a separate directory to start with. So, if you had just downloaded the source to my new project how would you run the unit tests? I'd prefer an answer that would let me say to my users: "To run the unit tests do X."

    Read the article

  • No class def found error for JUnit Test on android

    - by J Bellamy
    I am having some very bizarre behaviour. I have a large number of test cases for my Android application, and they all work except for one. When I run this one I get a java.lang.NoClassDefFoundError: org.JUnit.test Yes, I have the JUnit 4 library imported into the project, and my other JUnit tests are running without any problems. What is particularly bizarre is that before I hit this problem I had an error in my code- basically, I tried writing a file to a read only folder. When that occurred, the JUnitTest would execute up to the point where it would hit an IO exception for accessing a part of memory it cannot access. I fix this problem, and suddenly the Android emulator doesn't seem to know what org.JUnit.test is. I have examined the run configuration for this test class, and it is the same as my others. It is in the same folder as the other tests as well. It also uses the same import statements. Any idea on what is going on? I am using the Android 10 emulator, and eclipse version 3.7.2. Edit: To clarify, the error I get appears on Logcat and not in my Eclipse project.

    Read the article

  • Ensure that all getter methods were called in a JUnit test

    - by Freiheit
    I have a class that uses XStream and is used as a transfer format for my application. I am writing tests for other classes that map this transfer format to and from a different messaging standard. I would like to ensure that all getters on my class are called within a test to ensure that if a new field is added, my test properly checks for it. A rough outline of the XStream class @XStreamAlias("thing") public class Thing implements Serializable { private int id; private int someField; public int getId(){ ... } public int someField() { ... } } So now if I update that class to be: @XStreamAlias("thing") public class Thing implements Serializable { private int id; private int someField; private String newField; public int getId(){ ... } public int getSomeField() { ... } public String getNewField(){ ... } } I would want my test to fail because the old tests are not calling getNewField(). The goal is to ensure that if new getters are added, that we have some way of ensuring that the tests check them. Ideally, this would be contained entirely in the test and not require modifying the underlying Thing class. Any ideas? Thanks for looking!

    Read the article

  • Integration test for H1 text failing when it should be passing (Rspec and Capybara)

    - by rebec
    Below you can see my test for what happens when a user tries to access the page to edit a profile photo that they don't own. I've used the same test on the NEW action, where it worked fine, but it surprised me by failing when I copied it down to the EDIT action tests. I've used save_and_open_page to test what Capybara's seeing (as you can see below); the resulting page definitely has an h1 with the specified text in it. No spelling errors, and case is all the same as in the test. I've tried using both have_css and have_selector. Both fail. I'm still learning Ruby, Rails, Rspec and especially Capybara (was using webrat previously and recently switched over), and wonder if I'm misconceiving of something that's making me expect this to pass when it doesn't. Any thoughts? Thanks! describe "EDIT" do let(:user) { FactoryGirl.create(:user) } let(:different_user) { FactoryGirl.create(:user) } let(:admin_user) { FactoryGirl.create(:user, role: "admin") } let(:profile_photo1) { FactoryGirl.create(:profile_photo, user: user) } subject { page } context "when signed in as any member" do before { login different_user visit edit_user_profile_photo_path(:id => profile_photo1, :user_id => profile_photo1.user_id) save_and_open_page } # It should deny access with an Unauthorised/Forbidden message. it { should have_css('h1', text: "Unauthorised/Forbidden.") } end

    Read the article

  • junit test error - ClassCastException

    - by Josepth Vodary
    When trying to run a junit test I get the following error - java.lang.ClassCastException: business.Factory cannot be cast to services.itemservice.IItemsService at business.ItemManager.get(ItemManager.java:56) at business.ItemMgrTest.testGet(ItemMgrTest.java:49) The specific test that is causing the problem is @Test public void testGet() { Assert.assertTrue(itemmgr.get(items)); } The code it is testing is... public boolean get(Items item) { boolean gotItems = false; Factory factory = Factory.getInstance(); @SuppressWarnings("static-access") IItemsService getItem = (IItemsService)factory.getInstance(); try { getItem.getItems("pens", 15, "red", "gel"); gotItems = true; } catch (ItemNotFoundException e) { // catch e.printStackTrace(); System.out.println("Error - Item Not Found"); } return gotItems; } The test to store items, which is nearly identical, works just fine... The factory class is.. public class Factory { private Factory() {} private static Factory Factory = new Factory(); public static Factory getInstance() {return Factory;} public static IService getService(String serviceName) throws ServiceLoadException { try { Class<?> c = Class.forName(getImplName(serviceName)); return (IService)c.newInstance(); } catch (Exception e) { throw new ServiceLoadException(serviceName + "not loaded"); } } private static String getImplName (String serviceName) throws Exception { java.util.Properties props = new java.util.Properties(); java.io.FileInputStream fis = new java.io.FileInputStream("config\\application.properties"); props.load(fis); fis.close(); return props.getProperty(serviceName); } }

    Read the article

  • Credit card validation with regexp using test()

    - by Matt
    I'm trying to complete some homework and it appears the book might have gotten it wrong. I have a simple html page that allows user to pick a credit card in our case american express. The user then enters a number and evalutes that number based on a regular expression. My question ends up being when test() evaluates the number it returns a boolean or a string? I should then compare that string or boolean? True == true should fire off the code in a nested if statement. Heres what the book gives me as valid code: if(document.forms[0].cardName.value == "American Express") { var cardProtocol = new RegExp("^3[47][0-9]{13}$"); //REGEX ENTRY HERE if(cardProtocol.test(document.forms[0].cardNumber.value)) document.forms[0].ccResult.value = "Valid credit card number"; } The above code doesn't work in firefox. I've tried modifying it with 2 alerts to make sure the number is good and the boolean is good...and still no luck: if(document.forms[0].cardName.value == "American Express") { var cardProtocol = new RegExp("^3[47][0-9]{13}$"); //REGEX ENTRY HERE <------ alert(document.forms[0].cardNumber.value) alert(cardProtocol.test(document.forms[0].cardNumber.value)) if((cardProtocol.test(document.forms[0].cardNumber.value)) == true ) // <--Problem { document.forms[0].ccResult.value = "Valid credit card number"; } else { document.forms[0].ccResult.value = "Invalid credit card number"; } } Any ideas? the if loop is the culprit but I'm not figuring out why it is not working. Please throw up the code for the if loop! Thanks for the help!

    Read the article

  • J2EE Applications, SPARC T4, Solaris Containers, and Resource Pools

    - by user12620111
    I've obtained a substantial performance improvement on a SPARC T4-2 Server running a J2EE Application Server Cluster by deploying the cluster members into Oracle Solaris Containers and binding those containers to cores of the SPARC T4 Processor. This is not a surprising result, in fact, it is consistent with other results that are available on the Internet. See the "references", below, for some examples. Nonetheless, here is a summary of my configuration and results. (1.0) Before deploying a J2EE Application Server Cluster into a virtualized environment, many decisions need to be made. I'm not claiming that all of the decisions that I have a made will work well for every environment. In fact, I'm not even claiming that all of the decisions are the best possible for my environment. I'm only claiming that of the small sample of configurations that I've tested, this is the one that is working best for me. Here are some of the decisions that needed to be made: (1.1) Which virtualization option? There are several virtualization options and isolation levels that are available. Options include: Hard partitions:  Dynamic Domains on Sun SPARC Enterprise M-Series Servers Hypervisor based virtualization such as Oracle VM Server for SPARC (LDOMs) on SPARC T-Series Servers OS Virtualization using Oracle Solaris Containers Resource management tools in the Oracle Solaris OS to control the amount of resources an application receives, such as CPU cycles, physical memory, and network bandwidth. Oracle Solaris Containers provide the right level of isolation and flexibility for my environment. To borrow some words from my friends in marketing, "The SPARC T4 processor leverages the unique, no-cost virtualization capabilities of Oracle Solaris Zones"  (1.2) How to associate Oracle Solaris Containers with resources? There are several options available to associate containers with resources, including (a) resource pool association (b) dedicated-cpu resources and (c) capped-cpu resources. I chose to create resource pools and associate them with the containers because I wanted explicit control over the cores and virtual processors.  (1.3) Cluster Topology? Is it best to deploy (a) multiple application servers on one node, (b) one application server on multiple nodes, or (c) multiple application servers on multiple nodes? After a few quick tests, it appears that one application server per Oracle Solaris Container is a good solution. (1.4) Number of cluster members to deploy? I chose to deploy four big 64-bit application servers. I would like go back a test many 32-bit application servers, but that is left for another day. (2.0) Configuration tested. (2.1) I was using a SPARC T4-2 Server which has 2 CPU and 128 virtual processors. To understand the physical layout of the hardware on Solaris 10, I used the OpenSolaris psrinfo perl script available at http://hub.opensolaris.org/bin/download/Community+Group+performance/files/psrinfo.pl: test# ./psrinfo.pl -pv The physical processor has 8 cores and 64 virtual processors (0-63) The core has 8 virtual processors (0-7)   The core has 8 virtual processors (8-15)   The core has 8 virtual processors (16-23)   The core has 8 virtual processors (24-31)   The core has 8 virtual processors (32-39)   The core has 8 virtual processors (40-47)   The core has 8 virtual processors (48-55)   The core has 8 virtual processors (56-63)     SPARC-T4 (chipid 0, clock 2848 MHz) The physical processor has 8 cores and 64 virtual processors (64-127)   The core has 8 virtual processors (64-71)   The core has 8 virtual processors (72-79)   The core has 8 virtual processors (80-87)   The core has 8 virtual processors (88-95)   The core has 8 virtual processors (96-103)   The core has 8 virtual processors (104-111)   The core has 8 virtual processors (112-119)   The core has 8 virtual processors (120-127)     SPARC-T4 (chipid 1, clock 2848 MHz) (2.2) The "before" test: without processor binding. I started with a 4-member cluster deployed into 4 Oracle Solaris Containers. Each container used a unique gigabit Ethernet port for HTTP traffic. The containers shared a 10 gigabit Ethernet port for JDBC traffic. (2.3) The "after" test: with processor binding. I ran one application server in the Global Zone and another application server in each of the three non-global zones (NGZ):  (3.0) Configuration steps. The following steps need to be repeated for all three Oracle Solaris Containers. (3.1) Stop AppServers from the BUI. (3.2) Stop the NGZ. test# ssh test-z2 init 5 (3.3) Enable resource pools: test# svcadm enable pools (3.4) Create the resource pool: test# poolcfg -dc 'create pool pool-test-z2' (3.5) Create the processor set: test# poolcfg -dc 'create pset pset-test-z2' (3.6) Specify the maximum number of CPU's that may be addd to the processor set: test# poolcfg -dc 'modify pset pset-test-z2 (uint pset.max=32)' (3.7) bash syntax to add Virtual CPUs to the processor set: test# (( i = 64 )); while (( i < 96 )); do poolcfg -dc "transfer to pset pset-test-z2 (cpu $i)"; (( i = i + 1 )) ; done (3.8) Associate the resource pool with the processor set: test# poolcfg -dc 'associate pool pool-test-z2 (pset pset-test-z2)' (3.9) Tell the zone to use the resource pool that has been created: test# zonecfg -z test-z1 set pool=pool-test-z2 (3.10) Boot the Oracle Solaris Container test# zoneadm -z test-z2 boot (3.11) Save the configuration to /etc/pooladm.conf test# pooladm -s (4.0) Results. Using the resource pools improves both throughput and response time: (5.0) References: System Administration Guide: Oracle Solaris Containers-Resource Management and Oracle Solaris Zones Capitalizing on large numbers of processors with WebSphere Portal on Solaris WebSphere Application Server and T5440 (Dileep Kumar's Weblog)  http://www.brendangregg.com/zones.html Reuters Market Data System, RMDS 6 Multiple Instances (Consolidated), Performance Test Results in Solaris, Containers/Zones Environment on Sun Blade X6270 by Amjad Khan, 2009.

    Read the article

  • How to unit test C# Web Service with Visual Studio 2008

    - by Steven Behnke
    How are you supposed to unit test a web service in C# with Visual Studio 2008? When I generate a unit test it adds an actual reference to the web service class instead of a web reference. It sets the attributes specified in: http://msdn.microsoft.com/en-us/library/ms243399(VS.80).aspx#TestingWebServiceLocally Yet, it will complete without executing the test. I attempted to add the call to WebServiceHelper.TryUrlRedirection(...) but the call does not like the target since it inherits from WebService not WebClientProtocol. Thanks, Steven

    Read the article

  • First Test Crashes using MSTEST with ASP.NET MVC 1

    - by Trey Carroll
    I'm trying to start using Unit Testing and I want to test the following Controller: public class AjaxController : Controller { ... public JsonResult RateVideo( int userRating, long videoId ) { string userName = User.Identity.Name; ... } } I have a created a TestClass with the following method: [ TestMethod public void TestRateVideo() { //Arrange AjaxController c = new AjaxController(); //Act JsonResult jr = c.RateVideo(1, 1); //Assert //Not implemented yet } I select debug and run the test. When the code reaches the 1st statement: string username = User.Identity.Name; Debugging stops and I am presented with a message that says that the test failed. Any guidance you can offer would be appreciated.

    Read the article

  • How to test localized winforms application?

    - by Sun
    Background: I have created sample windows application for learning to implement localization. My each form has two RESX file. One for Bulgaria and one for French(Belgium). It has default culture English(XX) To test locally currently I am programmatically changing UICulture i.e. Thread.CurrentThread.CurrentUICulture = new CultureInfo("fr-BE"); And it works fine. Problem: How can I test without forcing the UI Culture programatically? I have tried changing Control Panel Regional Options Standard and Formats to French(Belgium). That made changes to DatePickerControl and now it display the dates French. However I can still see the Button text in English, where as if I test by injecting CultureInfo programmatically it changes to french. If I am able to change the standard and formats to French do I still need to Install Multilingual User Interface Pack (MUI)?

    Read the article

  • Use Google Test from Qt in Windows

    - by Dave
    I have a simple test file, TestMe.cpp: #include <gtest/gtest.h> TEST(MyTest, SomeTest) { EXPECT_EQ(1, 1); } int main(int argc, char **argv) { ::testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); } I have Google Test built as a static library. (I can provide the makefile if it's relevant.) I can compile TestMe.cpp from a command-line with no problem: g++ TestMe.cpp -IC:\gtest-1.5.0\gtest-1.5.0\include -L../gtest/staticlib -lgtest -o TestMe.exe It runs as expected. However, I cannot get this to compile in Qt. My Qt project file, in the same directory: SOURCES += TestMe.cpp INCLUDEPATH += C:\gtest-1.5.0\gtest-1.5.0\include LIBS += -L../gtest/staticlib -lgtest This results in 17 "unresolved external symbol" errors related to gtest functions. I'm pulling my hair out here, as I'm sure it's something simple. Any ideas?

    Read the article

< Previous Page | 30 31 32 33 34 35 36 37 38 39 40 41  | Next Page >